









USE pubs
DECLARE tnames_cursor CURSOR
FOR
SELECT state
FROM authors
open tnames_cursor
declare @state varchar(50)
Fetch tnames_cursor into @state
while (@@fetch_status=0)
begin
if(@state='CA')
begin
print 'sd'
end
FETCH NEXT FROM tnames_cursor INTO @state
end
CLOSE tnames_cursor
DEALLOCATE tnames_cursor
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。