select name from sysobjects where xtype='u' --查询数据库中所有表名
select * from sys.tables order by create_date desc --按表创建的时间
select * from sys.tables order by modify_date desc --按表修改的时间
select count(name) from syscolumns where id=object_id('表名') -- 显示一个表有多少个字段
--表添加字段
alter table 表名 add 字段名 字段类型;
--删除一个字段
alter table 表名 drop column 字段名;
SQL数据库同步语句,适合直操数据库
最新推荐文章于 2024-04-13 15:56:39 发布