现在把比较数据库变化的SQL语句记录如下:(在MSSQL测试通过)
sql 代码
- DECLARE @t varchar(64),@flag varchar(64)
- set @t=''
- set @flag=''
- DECLARE authors_cursor CURSOR FOR
- SELECT Name FROM
- test_sl2..SysObjects Where XType='U' ORDER BY Name
- OPEN authors_cursor
- FETCH NEXT FROM authors_cursor into @t
- --select @t as one
- --exec ('select * from '+@t)
- WHILE @@FETCH_STATUS = 0
- BEGIN
- -- This is executed as long as the previous fetch succeeds.
- select @t as 表名
- exec ('select * from '+@t+' where ')
- end
- FETCH NEXT FROM authors_cursor into @t
- End
- CLOSE authors_cursor
- DEALLOCATE authors_cursor
上面的代码可以将数据库全查出了,你选择存为文件,将文件用UE来比较就可以知道数据那些值被改动过了.