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

推荐订阅源

J
Java Code Geeks
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Blog — PlanetScale
Blog — PlanetScale
G
Google Developers Blog
Microsoft Security Blog
Microsoft Security Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
腾讯CDC
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Jina AI
Jina AI
雷峰网
雷峰网
T
Tailwind CSS Blog
爱范儿
爱范儿
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
酷 壳 – CoolShell
酷 壳 – CoolShell
大猫的无限游戏
大猫的无限游戏
月光博客
月光博客
博客园 - 司徒正美
I
InfoQ
Engineering at Meta
Engineering at Meta
Vercel News
Vercel News
小众软件
小众软件
U
Unit 42
Google DeepMind News
Google DeepMind News
D
DataBreaches.Net

博客园 - Wintle

招聘需求分析师(RA) 整理一下提供的下载 好久没有写这里的Blog了。 www.codeplus.net备案成功,网站重新开通! www.codeplus.net 由于正在进行备案,所以目前无法访问。 [更新] CodePlus V2.0 提供对 oracle 支持 - Wintle 发布无限制版CodePlusV2.0,致歉,并回复所有来信的朋友 [解决问题]asp.net程序编译调试时偶尔出现访问被拒绝的错误 - Wintle - 博客园 CodePlusV2.0推出半个月,下载量已超过1万,今天你用CodePlus了吗? CodePlus V2.0 的一些更新 (2005-9-6) CodePlus v2.0 又修正了一个bug - Wintle CodePlus 代码生成器 V2.0 最近更新 (2005-8-30) CodePlus 代码生成器 V2.0 新鲜出炉,请大家下载使用 黄天不负有心人,终于全身而退,哈哈 Contact.Net 更新 改名浅屋 用sqlite3数据库做了一个个人关系管理软件:) SQL SERVER 数据库的同库不同版本间的比较程序 离开了自己很久,终于在之前决心回来。
替换表中所有null为"无"的sql
Wintle · 2005-08-20 · via 博客园 - Wintle

Posted on 2005-08-20 16:59  Wintle  阅读(1191)  评论(0)    收藏  举报

先放一放。呵呵。

declare @newstr varchar(100)
set @newstr=''  --新字符

declare @table varchar(256)
set @table='year2004'  --

declare @upcol varchar(8000)
declare tb cursor local for
select upcol='update ['+b.name+'] set ['+a.name+']='''+@newstr+''' where ['+a.name+'] is null'
from syscolumns a join sysobjects b on a.id=b.id
where b.xtype='U' and a.status>=0
 
and a.xusertype in(175,239,231,167and b.name=@table
open tb
fetch next from tb into @upcol
while @@fetch_status=0
begin
 
exec(@upcol)
 
fetch next from tb into @upcol
end
close tb
deallocate tb