惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Martin Fowler
Martin Fowler
Blog — PlanetScale
Blog — PlanetScale
Vercel News
Vercel News
L
LangChain Blog
Google DeepMind News
Google DeepMind News
H
Hackread – Cybersecurity News, Data Breaches, AI and More
F
Fortinet All Blogs
The GitHub Blog
The GitHub Blog
Recent Announcements
Recent Announcements
D
DataBreaches.Net
云风的 BLOG
云风的 BLOG
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
A
About on SuperTechFans
博客园_首页
N
Netflix TechBlog - Medium
Y
Y Combinator Blog
Hugging Face - Blog
Hugging Face - Blog
Last Week in AI
Last Week in AI
酷 壳 – CoolShell
酷 壳 – CoolShell
B
Blog
Apple Machine Learning Research
Apple Machine Learning Research
罗磊的独立博客
美团技术团队
V
V2EX

博客园 - jirong

SQL2005 读取 XML 数据 SHTML 教程 automation服务器不能创建对象 C#动态方法调用 - jirong - 博客园 加密存储过程,函数,触发器,视图的破解 - jirong - 博客园 SQLServer和Oracle的常用函数对比 窗口最大化 - jirong - 博客园 存储过程编写经验和优化措施 ASP.NET 2.0 Internet安全之参考实现 常用正则表达式 - jirong - 博客园 对象序列化 javascript事件查询 JavaScript就这么回事 ASP.NET2.0+SQL Server2005构建多层应用 Microsoft .NET Pet Shop 4 架构与技术分析 分页控件 ASP.NET 调味品:AJAX 我写的第一个CodeSmith模板(添加修改数据页面) CodeSmith应用(四):实现选择路径对话框
游标的用法
jirong · 2006-05-16 · via 博客园 - jirong


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