注册 登录
编程论坛 SQL Server论坛

大家看看哪里有问题

we921 发布于 2008-04-14 19:03, 1327 次点击
use pubs
go
if exists(select * from sysobjects where name = 'test')
drop table test
go
create table test
(
    pid int default(32),
    rid int default(1),
    uid int,
)
go
insert into test(uid) values(1)
go
--创建存储过程
if exists(select * from sysobjects where name = 'tt')
drop proc tt
go
create proc tt
as
declare @num int
select @num=uid from test
while @num<=514
begin
insert into test(uid) values(@num)
set @num=@num+1
end
go
exec tt
go
select * from test
go
--delete test
4 回复
#2
makebest2008-04-14 19:04
这样的问题想回答都难!
#3
we9212008-04-14 19:07
- -
补充一个问题
 存储过程
如何输入ABCD
   输出A,B,C,D

case?
#4
lff6422008-04-25 17:28
请问是什么问题.我测试过了.没有一点问题.运行得好好的.
1