获取表: select table_name from user_tables; //当前用户的表 select table_name from all_tables; //所有用户的表 select table_name from dba_tables; //包括系统表 select table_name from dba_tables where owner='用户名' user_tables: table_name,tablespace_name,last_analyzed等 dba_ta
用法 mysql>show table status; mysql>show table status like 'esf_seller_history'\G; mysql>show table status like 'esf_%'\G; 例子: mysql>show table status like 'esf_seller_history'\G; 1.Name 表名称 2.Engine: 表的存储引擎 3.Version: 版本号
PostgreSQL数据库中获取表主键名称 一.如下表示,要获取teacher表的主键信息: select pg_constraint.conname as pk_name,pg_attribute.attname as colname,pg_type.typname as typename from pg_constraint inner join pg_class on pg_constraint.conrelid = pg_class.oid inner join pg_attribute
1.获取数据库中的表 select name from sysobjects where type='U' 2.获取表字段(此处是Route表) Select name from syscolumns Where ID=OBJECT_ID('Route') 3.获取表中字段的描述 SELECT value FROM ::fn_listextendedproperty (NULL, 'user', 'dbo', 'table', 'Route', 'column', default) 4.获取表的
1.MySql获取表结构信息 SELECT TABLE_NAME, TABLE_COMMENT FROM information_schema.`TABLES` WHERE TABLE_SCHEMA = 'dm' -- dm 是数据库名称,需替换 ORDER BY TABLE_NAME; 2.MySql获取字段信息 SELECT TABLE_NAME AS 'tableName', COLUMN_NAME AS 'columnName', COLUMN_COMMENT AS 'columnCom