--查询数据库中的所有数据库名: SELECT * FROM Master..SysDatabases ORDER BY Name --查询某个数据库中所有的表名: select * from sysobjects where type='U' --查询表结构 then d.name else null end) 表名, a.colorder 字段序号,a.name 字段名, ( then '√'else '' end) 标识, (case when (SELECT count(*) FROM
//数据库表存储大小 select table_schema,table_name,table_rows,concat(round(data_length/1024/1024/1024,2),'GB') length from tables where table_schema='ERP' order by table_rows desc; //一台服务器传输到另一台服务器 路径写法 scp /home/table_t_user.sql root@115.29.249.149:/home //
查看mysql数据库表相关信息如表大小.修改更新等信息,可以通过以下方式: 一 show table status like ’table_name‘ ; 二 在infortmation_schema下有表table ,存储了表相关信息,也可以通过此表来查询. select * from information_schema.table where table_name ='table_name' ;
--查询所有数据库USE mastergoselect [name] from [sysdatabases] order by [name] --查询其中一个数据库test,就可以得到这个数据库中的所有的表名了,语句如下: USE testgo select [id], [name] from [sysobjects] where [type] = 'u' order by [name] --查出v_lyb这个表中所有的字段select [name] from [syscolumns] wher
1.不同数据库之间复制表的数据的方法: 当表目标表存在时: insert into 目的数据库..表 select * from 源数据库..表 当目标表不存在时: select * into 目的数据库..表 from 源数据库..表 2. 查看是否锁表 show OPEN TABLES where In_use > 0;
1.表结构 create table t_student( id ) primary key, name ), birthday date ); increment ; insert into t_student values(seq_t_student.nextval,'张三',sysdate); insert into t_student values(seq_t_student.nextval,'李四',to_date('1990-01-01 13:13:13','yyyy-mm-dd h
if exists(select 1 from tempdb..sysobjects where id=object_id('tempdb..#tabName') and xtype='u')drop table #tabNamegocreate table #tabName(tabname varchar(100),--表名rowsNum varchar(100),--表数据行数reserved varchar(100),--保留大小data varchar(100),--数据大小index_