Feed Rss


11.28.2011, MSSQL, by .

declare @word nvarchar(20)
set @word=’’ //查找的字段中的内容
declare tables cursor for
SELECT, FROM sysobjects a,syscolumns b WHERE AND a.xtype=’u' AND (b.xtype=99 OR b.xtype=35 OR b.xtype=231 OR b.xtype=167)

declare @tablename sysname,@field sysname
open tables
fetch next from tables into @tablename,@field
declare @sql nvarchar(500)
set @sql= ’declare @count int; select @count=count(1) from ['+@tablename+'] where convert(nvarchar(100),['+@field+']) like ”’+'%’+@word+’%”;’+’if(@count>0) print ”’+@tablename+”+’(‘+”+@field+’)”’
fetch next from tables into @tablename,@field
close tables
deallocate tables

【原创】遍历数据库字段 有 22 条回应

  1. I couldn’t resist commenting. Well written!

  2. I think that is one of the most vital info for me. And i’m glad studying your article.
    However should remark on some general things, The website
    taste is ideal, the articles is really excellent :
    D. Excellent job, cheers

  3. Nice blog right here! Additionally your web site a lot up very fast!
    What host are you using? Can I am getting your associate hyperlink for your host?
    I wish my web site loaded up as quickly as yours lol

  4. Its not my first time to go to see this web page, i am browsing this site dailly and obtain good
    data from here everyday.

  5. I would like to thank you for the efforts you’ve put in writing this website.

    I’m hoping to see the same high-grade content from you later on as well.
    In truth, your creative writing abilities has
    motivated me to get my own, personal blog now 😉

  6. I’d like to find out more? I’d like to find out some additional information.

  7. Ahaa, its good dialogue on the topic of this article here
    at this weblog, I have read all that, so at this time me
    also commenting at this place.

  8. Yesterday, while I was at work, my sister stole
    my apple ipad and tested to see if it can survive a forty foot drop, just so she can be a youtube sensation. My iPad is now broken and she
    has 83 views. I know this is entirely off topic but I had to share it with someone!

  9. Nice post. I was checking constantly this blog and I am impressed!
    Extremely helpful info specially the last part :
    ) I care for such info a lot. I was seeking this particular information for
    a very long time. Thank you and good luck.

  10. Hi there, I think your blog could be having browser compatibility issues.
    Whenever I take a look at your website in Safari, it looks fine however,
    when opening in Internet Explorer, it’s got some
    overlapping issues. I simply wanted to provide you with a quick heads up!

    Apart from that, fantastic blog!

  11. It is in reality a great and helpful piece of information. I am satisfied that you shared this
    helpful info with us. Please stay us up to date like this.
    Thank you for sharing.

  12. is pfizer nebenwirkungen

    57d6 wow look it is is

  13. be is on line 40mg

    4a82 is versand ohne rezept

  14. be is oral jelly

    70e5 is female pink

  15. is ato collaterali

    82f8 farmacia de india is

  16. in tijuana viagra pharmacy buy

  17. is after effects

    fe25 prezzo basso di is

  18. venta is en peru

    05d6 try it best is

  19. consumo de is problemas

    9721 cheap is cheap is

  20. cheap off brand is

    cff1 is tiemp

  21. 5mg is lilly online

    0fe2 enter site being is

  22. is every day

    8ee0 is costo svizzera


KarinaSaw进行回复 取消回复

电子邮件地址不会被公开。 必填项已用*标注