--新增字段
select object_name(id),name from test..syscolumns
where name not in(select name from logistics..syscolumns)
and id in(select id from logistics..sysobjects where xtype='u')
order by object_name(id)
--修改长度字段
select object_name(a.id),a.name,a.length,b.length from test..syscolumns a,logistics..syscolumns b
where a.id=b.id and a.name=b.name and a.length<>b.length order by object_name(a.id)
--新增数据表
select * from test..sysobjects
where name not in( select name from logistics..sysobjects) and xtype='U'
--新增存储过程
select * from test.sys.procedures
where name not in(select name from logistics.sys.procedures) order by name
--修改过的存储过程
select * from test.sys.procedures
where name in(select name from logistics.sys.procedures) and modify_date>'2018-07-05' order by name
数据库比对
最新推荐文章于 2024-09-25 14:52:01 发布