SQL IF Syntax

맨날쓰고 맨날 까먹는다. ㅡㅡ;;

Description

Use this statement to control conditional execution of a SQL statement, as an alternative to the Watcom-SQL IF statement.

Syntax

IF expression
statement
[ ELSE
[ IF expression ]
statement ]

Usage

The Transact-SQL IF conditional and the ELSE conditional each control the execution of only a single SQL statement or compound statement (between the keywords BEGIN and END).

In comparison to the Watcom-SQL IF statement, there is no THEN in the Transact-SQL IF statement. The Transact-SQL version also has no ELSEIF or END IF keywords.

예)
IF @Argument = 1
BEGIN
   SELECT '1'
   SELECT '2'
END

Posted by 망고

2006/09/26 11:51 2006/09/26 11:51
Response
No Trackback , No Comment
RSS :
http://www.shimminkyu.com/tc/rss/response/278

Trackback URL : http://www.shimminkyu.com/tc/trackback/278

Leave a comment
« Previous : 1 : ... 828 : 829 : 830 : 831 : 832 : 833 : 834 : 835 : 836 : ... 1061 : Next »

Lilypie Fourth Birthday tickers

Stay Foolish, Stay Hungry.

- 망고

Site Stats

Total hits:
439958
Today:
115
Yesterday:
177