52ky 发表于 2022-5-2 13:03:39

SQL语句:SQLWHILE(0=0)与WHILE @@FETCH_STATUS=0.

第一句是SQL循环用的,这个条件下,会读取所有的记录,因为会一直循环;

第二句是游标里的,@@fetch_status=0   等于0时,说明游标是成功的.

(The first sentence is for SQL loop. Under this condition, all records will be read, because it will loop all the time;
The second sentence is in the cursor, @ @ fetch_ When status = 0 equals 0, the cursor is successful
)



页: [1]
查看完整版本: SQL语句:SQLWHILE(0=0)与WHILE @@FETCH_STATUS=0.