You are here: Re: if exists condition.. « MsSQL Server « IT news, forums, messages
Re: if exists condition..

Posted by Tony Rogerson on 12/21/06 17:07

The first one; its more portable between versions of SQL Server, the second
only works in SQL 2005 and upwards.

--
Tony Rogerson
SQL Server MVP
http://sqlblogcasts.com/blogs/tonyrogerson - technical commentary from a SQL
Server Consultant
http://sqlserverfaq.com - free video tutorials


"fireball" <fireball@onet.kropka.eu> wrote in message
news:embrdl$n8d$1@atlantis.news.tpi.pl...
> which is more proper:
> if DB_ID(@db) IS NOT NULL
> or
> IF EXISTS (SELECT name FROM sys.databases WHERE name = @db)
> ?
>
>
>
>
> regards
>
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация