获取表名

1、Use Dictionary

static void findTables(Args _args)

{

Dictionary dictionary;

TableId tableId;

tableName tableName;

;

dictionary = new Dictionary();

tableId = dictionary.tableNext(0);

tableName = dictionary.tableName(tableId);

while (tableId)

{

info(strfmt("%1 - %2",int2str(tableId), tableName));

tableId = dictionary.tableNext(tableId);

tableName = dictionary.tableName(tableId);

}

}

2、Use SqlDictionary

SQLDictionary dictTable;

while select * from dictTable where dictTable.fieldId == 0

{

print dicttable.name, ‘ ‘, dicttable.tabId;

}

pause;

原文地址:https://www.cnblogs.com/xtwkh1973/p/10993099.html

时间: 2024-11-09 10:17:12

获取表名的相关文章

oracle&&Sqlserver获取表名列名主键及数据类型

SQlserver获得列名,列类型,列类型长度,scale,prec等数据类型(syscolumns,systypes,sysobjects均为视图) select a.name as colname, b.name as typename,a.length as length,a.scale as scale,a.prec as prec from syscolumns a,systypes b ,sysobjects c where a.xusertype=b.xusertype and a

SQLSERVER和ORACLE系统表获取表名 列名以及列的注释

在工作中从数据库取的数据要导出来,但是发现导出的EXCEL中列名都是字段名(英文),为此搜集资料怎么把字段名变为中文名称,而发现ORACLE和SQLSERVER(用的SQLSERVER2008R2)又有所不同,具体如下: SQLSERVER数据库: 系统表: ---获取表的相关信息              select * from SYS.OBJECTS  (说明:name:表名 object_id:表的ID)  ---获取列的相关信息 select * from SYS.COLUMNS (

根据时间范围获取表名(table_prefix)

分表规则为:每月分两张表.1-15号为 table_prefix_Ym_1 ,16-31号为table_prefix_Ym_2 , 如:table_prefix_201903_1 <?php /** * @purpose: 根据时间范围获取表名 * @explain: 表名的分表规则是,每月分两张表,1-15号为 table_prefix_Ym_1 ,16-31号为table_prefix_2 , 如:table_prefix_201903_1 * User: Chrdai * Date: 20

workflow GetListIdByName 获取表名

1.Assign   获取表的地址 和表名 2.HttpsendWithSuspend==HttpSend 3.ParseDynamicValue 4.GetDynamicValueProperties 控件写好后

Oracle 获取表名和某个表的所有列名

获取某用户下所有的表名: select table_name from user_tables order by table_name; 获取某用户下某个表的所有列名 where 语句中TABLE_NAME="表名"  表名必需大写: select column_name from user_tab_columns where Table_Name = 'EMP' order by column_name; 原文地址:https://www.cnblogs.com/xsdf/p/825

根据时间段和数据库表名的前缀获取表名

/**      * $stime 开始时间   $etime 结束时间  $table 表前缀      */     public function getcalltablename($starttime,$endtime,$tablename){              $startsj=strtotime($starttime);         $endsj=strtotime($endtime);                  $daynums=floor(($endsj-$s

Mssql根据表名获取字段

根据表名获取表名.字段.描述和类型长度,正好有需要的朋友们可参考添加自需的字段,sql语句如下: 1 SELECT TableName = OBJECT_NAME(cols.object_id), ColumnsName = props.name, Description = props.value, Length=cols.max_length 2 FROM sys.columns cols inner JOIN sys.extended_properties props ON 3 props

MySQL获取Schema表名和字段信息

MySQL获取Schema表名和字段信息 获取表名 select TABLE_NAME,TABLE_TYPE,ENGINE,TABLE_ROWS,TABLE_COMMENT,CREATE_TIME,UPDATE_TIME, CHECK_TIME from information_schema.TABLES where TABLE_SCHEMA='t_shop' ; 获取字段名 select COLUMN_NAME,DATA_TYPE,CHARACTER_MAXIMUM_LENGTH,IS_NUL

postgresql 获取所有表名、字段名、字段类型、注释

获取表名及注释: select relname as tabname,cast(obj_description(relfilenode,'pg_class') as varchar) as comment from pg_class c where  relkind = 'r' and relname not like 'pg_%' and relname not like 'sql_%' order by relname 过滤掉分表: 加条件 and relchecks=0 即可 获取字段名.