您好,登錄后才能下訂單哦!
sql server 全部庫:
declare @i int,@id int,@dbname varchar(255),@sql varchar(255) set @i = 6 set @id=(select count(*) from master..sysdatabases) drop table #t create table #t ( dbname varchar(255), tablename varchar(255), columnname varchar(255) ) while (@i < @id) begin set @i = @i + 1; set @dbname = (select name from master..sysdatabases where dbid= @i) set @sql = 'use '+ @dbname+';insert [#t] select table_catalog,table_name,column_name from information_schema.columns where column_name like ''%pass%'' or column_name like ''%pwd%'' or column_name like ''%mail%''' exec (@sql) --print @sql end select * from #t drop table #t go
sql server單個庫:
SELECT sysobjects.name as tablename, syscolumns.name as columnname FROM sysobjects JOIN syscolumns ON sysobjects.id = syscolumns.id WHERE sysobjects.xtype = 'U' AND (syscolumns.name LIKE '%pass%' or syscolumns.name LIKE '%pwd%' or syscolumns.name LIKE '%first%');
select table_schema,table_name,column_name from information_schema.columns where table_schema !=0x696E666F726D6174696F6E5F736368656D61 and table_schema !=0x6D7973716C and table_schema !=0x706572666F726D616E63655F736368656D61 and (column_name like '%pass%' or column_name like '%pwd%');
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。