Position:Home>Database Development> Problem of Sybase memory process
Problem of Sybase memory process
From;  Author:Stand originally
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.

Previous:The detailed introduction of function of the Now() in MySQL
Next:Shallow talk how to build attributive management system effectively