Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

if statement

Status
Not open for further replies.

simma

Programmer
Joined
Sep 11, 2001
Messages
398
Location
US
hello
How do I frame if statement in sql.I want to execute some statemnts if @a=0 and some if @a=1.
 
if @a = 0
begin
do some stuff here
end
if @a = 1
begin
do some stuff here
end
 
Thanks
I already tried it
Its checking for first statement but if its false,its not going to second but giving error there.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top