1.查询所有数据库 SHOW DATABASES; 2.查询库中所有表 写法1: ① USE [DATABASE_NAME]; ② SHOW TABLES; 写法2: SHOW TABLES FROM [DATABASE_NAME] 3. 查询表结构 写法1: ① USE [DATABASE_NAME]; ② SHOW CREATE TABLE [TABLE_NAME]; 写法2: SHOW CREATE TABLE [DATABASE_NAME.TABLE_NAME]; 4. 查询表所有字段…
ms sql server 1.查询所有表select [id], [name] from [sysobjects] where [type] = 'u' order by [name]2.查询所有数据库3.select [name] from [sysdatabases] order by [name]查询表中字段 select [name] from [syscolumns] where [name] = 'tableXXX'order by [colid] oracle 1.查找表的所有索…
创建Oracle数据库表时加上注释 CREATE TABLE t1( id varchar2(32) primary key,name VARCHAR2(8) NOT NULL, age number, ) 添加表注释: COMMENT ON table t1 IS '个人信息'; 添加字段注释: comment on column t1.id is 'id'; comment on column t1.nameis '姓名'; comment on column t1.age is '年龄…
select utc.COLUMN_ID,utc.TABLE_NAME,utc.COLUMN_NAME,utc.DATA_TYPE||utc.DATA_LENGTH,utc.DATA_DEFAULT,utc.NULLABLE from user_tab_columns utc where table_name = upper('t_alert') order by utc.COLUMN_ID; select table_name from user_tables;…