我做过替换了,之后出现:
select * from SYS_PRIV_ALLOC where EFF_ALL = '长裤'
select * from SYS_PRIV_ALLOC where ROLE_ID = '长裤'
select * from SYS_PRIV_ALLOC where PRIV_ID = '长裤'
select * from SYS_PRSNL where PRSNL_NUM = '长裤'
select * from SYS_PRSNL where SURNAME = '长裤'
select * from SYS_PRSNL where GIVENNAME = '长裤'
select * from SYS_PRSNL where FULL_NAME = '长裤'
select * from SYS_PRSNL where INPUT_CODE = '长裤'
select * from SYS_PRSNL where GENDER = '长裤'
select * from SYS_PRSNL where ID_TYPE = '长裤'
select * from SYS_PRSNL where ID_NUM = '长裤'
select * from SYS_PRSNL where OFFICE_NUM = '长裤'
select a.name, c.name from sysobjects a
join sysindexes b on a.id=b.id
right join syscolumns c on c.id=b.id
--求字段的类型
join systypes d on d.xusertype=c.xusertype
where b.indid in (0,1)
and a.xtype='U'
and b.rows>100
and d.name like'%char%'
OPEN tutest_1
FETCH NEXT FROM tutest_1
INTO @table_name, @col_name
WHILE @@FETCH_STATUS = 0
begin
declare @sql varchar(8000)
set @sql=''
set @sql=+@sql+ 'select * from '+@table_name +' where '+ @col_name +' = ''kkkkkk'''
--exec(@sql)
-- 也可以把语句打出来
if @@rowcount>0
print(@sql)
FETCH NEXT FROM tutest_1 INTO @table_name, @col_name
end
CLOSE tutest_1
DEALLOCATE tutest_1