Minggu, 15 Agustus 2010
SQL Server - Writing IF-ELSE code in TSQL
IF..ELSE clause in SQL Server is used for decision making. You can use it to run a set of statements based on certain conditions. The following are the examples on how to use it effectively for various purposes. declare @status bitset @status=1if @status=0 print 'The event is closed'else print 'The event is started'if @status=0 Begin print 'use id column in the where clause' select * from #t
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar