Sunday, December 05, 2004

T-SQL statement

I found T-SQL is boring, and have no clue of those functions in it, here are two examples:

(1) raise error statements
format ---- RAISERROR ({msg_id msg_str }{,severity ,state }
RaisError('duplicate user name',10,1);

(2). if something is not exists
if not exists (select username from users where username = @username)

sure I need to use begin and end after if or else, just like VB, :(

No comments: