自己UP.
各位在CSDN中看到相關問題的解決貼子,請貼出來其鏈接.謝了!
各位在CSDN中看到相關問題的解決貼子,請貼出來其鏈接.謝了!
解决方案 »
- 请问各位前辈,你们的 SQL Server 2005 的联机丛书是哪年哪月份的版本?
- 请教各位SQL SERVER数据库的查询效率变低的问题?高手请进,急,急,急!!!!!!!!!!!
- 又一个关于触发器的问题!
- 新手问,SQL中有没有类似ACCESS自动编码的数据类型?
- Update 语句
- MSSQL 在legato 环境中 Failover 后, Replicate 不工作
- 初学:sql server数据库 和 mysql数据库 有区别吗?不是一个概念?
- 求一个存储过程,谢谢了
- 有谁知道哪有DVD版<狮子王>卖?最好是网上商店邮购也可,急求!!!!!
- 各位大虾救命!(ASP访问Oracle8) 各位兄弟快来看啦!!!!
- 求一用户自定义函数,功能:在字符串temp="a&b&c&d&"中查找一字符如s="c",判断字符s是否在temp中,在则返回1,不在则返回0
- 通过存储过程来对更新数据的合法性进行检测,帮我看看除了下面的方法有没有更好的!
create table ta(elno varchar(1),elrmk varchar(100))
insert into ta
select 'A','C1'
union all select 'A','C2,C3'
union all select 'B','C1'
union all select 'A',' R1'
union all select 'B','D1,D2,D3'
union all select 'A','D4'
union all select 'C','C1,C2'
select * from ta--建臨時表
create table temtab (id int identity(1,1),elno varchar(1),elrmk varchar(1000))
insert into temtab(elno) select distinct elno from ta
select * from temtabdeclare @s varchar(1000)
declare @maxid int,@intI int
select @maxid=max(id) from temtab
set @intI=1
while @intI<=@maxid
begin
set @s=''
select @s=@s+elrmk+',' from ta where elno in (select elno from temtab where id=@intI)
update temtab set elrmk=@s where id=@intI
set @intI=@intI+1
end
--刪除表
drop table ta
drop table temtab--測試結果
select elno,elrmk from temtabelno elrmk
=======================================
A C1,C2,C3, R1,D4,
B C1,D1,D2,D3,
C C1,C2,
順便問一下,你寫的SQL語句是通過什麽輔助軟件寫的,怎麽這麽快?