sql游标

DECLARE @username varchar(100)
DECLARE myCusor CURSOR FOR
select username from username
OPEN myCusor
FETCH NEXT FROM myCusor INTO @username
    WHILE @@FETCH_STATUS = 0
    BEGIN
        print @username
        FETCH NEXT FROM myCusor INTO @username
    END
    CLOSE myCusor
    DEALLOCATE myCusor
    A+
发布日期:2008年11月28日  所属分类:未分类

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: