Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
mary_itohan
Posting Yak Master
191 Posts |
Posted - 2008-10-01 : 06:43:33
|
| Hello,when using an if statement, must i use begin and end ?And if not, what is evaluated after the if statement ?ie i have a SP with multiple lines of code.if @@rowcount = 1set @true = 1...code continues here.Am wondering if is correct or i must use if @@rowcount = 1beginset @true = 1end_____________________Yes O ! |
|
|
ganeshkumar08
Posting Yak Master
187 Posts |
Posted - 2008-10-01 : 06:48:26
|
| If you have more that one statement you must place the statements between BEGIN and END, if you have single statement there is no need BEGIN and END.If @@rowcount = 1 set @true = 1is enough..Solutions are easy. Understanding the problem, now, that's the hard part |
 |
|
|
|
|
|