/// <summary> /// 查询数据库表单列 /// </summary> /// <param name="table"></param> /// <returns></returns> public DataTable GetColumns(string table) { string sql = $@" select OWNER, TABLE_NAME, COLUMN_NAME, DATA_TYPE, DATA_LENGTH, DATA_PRECISION, DATA_SCALE from all_tab_columns where Table_Name='{table}' "; return(OracleDataHelper.ExecuteDataTable(sql)); }
public DataTable GetCranes() { string sql = "SELECT * FROM PUB.CRANE"; return(OracleDataHelper.ExecuteDataTable(sql)); }
/// <summary> /// 查询数据库用户表单 /// </summary> /// <param name="user"></param> /// <returns></returns> public DataTable GetTables(string user) { string sql = $@"SELECT TABLE_NAME,OWNER FROM ALL_TABLES WHERE OWNER='{user}'"; return(OracleDataHelper.ExecuteDataTable(sql)); }
/// <summary> /// 查询id值 /// </summary> /// <param name="user"></param> /// <param name="table"></param> /// <returns></returns> public DataTable GetIDs(string user, string table) { string sql = $@"SELECT ID FROM {user}.{table}"; return(OracleDataHelper.ExecuteDataTable(sql)); }
/// <summary> /// 查询数据库用户 /// </summary> /// <returns></returns> public DataTable GetUsers() { string sql = "SELECT USERNAME FROM ALL_USERS WHERE ORACLE_MAINTAINED='N'"; return(OracleDataHelper.ExecuteDataTable(sql)); }