一、sqlserver命令
1、查询sqlserver中的每个数据库
select * from sysdatabases
2、查询sqlserver中指定数据库的所有表名
select name from cfs.. sysobjects where xtype='u' #注意:cfs 是数据库名称
3、查询表中的字段以及字段类型
select column_name as name,data_type as type
from information_schema.columns
where table_name = '表名'
二、mysql命令
1、查询mysql中的每个数据库
show databases
2、查询mysql中指定数据库的所有表名
select table_name as name
from information_schema.tables
where table_schema = '数据库名' and table_type = 'base table'
3、查询表中的字段以及字段类型
select column_name as name,data_type as type from information_schema.columns where table_schema='表名' and table_name='users'
三、orcal命令
1、查询orcal中的每个数据库
select * from v$tablespace
2、查询orcal中指定数据库的所有表名
select * from user_tables;
3、查询表中的字段以及字段类型
select column_name from user_tab_columns where table_name = 'table_name';--表名要全大写
如对本文有疑问, 点击进行留言回复!!
使用Visual Studio2019创建C#项目(窗体应用程序、控制台应用程序、Web应用程序)
C#实现获取本地内网(局域网)和外网(公网)IP地址的方法分析
网友评论