http://qs1969.pair.com?node_id=402221


in reply to Re^2: T-SQL problem - Perl solution?
in thread T-SQL problem - Perl solution?

That should work Win. What's nice about using information_schema is that it's ANSI standard so it will work on compliant dBs. Your question pertains directly to T-SQL but I like to code generically when there isn't a performance hit. When I work on other dBs I have to remember less vendor specific stuff. You don't need the SELECT 1 here. SELECT * with an EXISTS can yield internal performance optimizations with MS SQL Server. In this case it's probably trival but I thought I'd mention it.