Ask: Sybase memory process, why to carry out this oneSelect @nSerialNo = Serialno From Schedule Where Phonenum= @strPhoneNum And Type = @nTypeIf @@rowcount = 0Begin
. . . EndElseBegin
. . . End
The Select result above is empty record volume, memory process carries out empty record volume, can you return?
Answer: Does the logic of this statement have If Exists(select @nSerialNo = Serialno From Schedule Where Phonenum= @strPhoneNum And Type = @nType) bit of problem? Is If Exists to be used commonly whether to put in similar notes certainly? Do you want to assign the result of existence again now? Still be inferior to writing If Exists actually (Select 1 From Schedule Where Phonenum= @strPhoneNum And Type = @nType)
Whether to put in such record certainly, carrying out corresponding processing.
Hot Tags: