把sql的存储过程 改成 oracle的存储过程
第一个:查找所有ALTERproc[dbo].[admin_select]asselect*fromadministrator第二个:登录ALTERproc[dbo].[...
第一个:查找所有
ALTER proc [dbo].[admin_select]
as
select * from administrator
第二个:登录
ALTER proc [dbo].[admin_denlu]
@adminname varchar(20),
@adminpassword varchar(40),
@powername varchar(20)
as
select adminid from administrator where adminname = @adminname and adminpassword= @adminpassword and powername=@powername
第三个:add增加
ALTER proc [dbo].[admin_add]
@adminid int,
@adminname varchar(20),
@adminpassword varchar(40),
@powername varchar(20)
as
if not exists(select adminname from administrator where adminname=@adminname)
begin
insert into administrator(adminname,adminpassword,powername)values(@adminname,@adminpassword,@powername)
end
第四个:update更新
ALTER proc [dbo].[admin_update]
@adminname varchar(20), --用户名
@adminpassword varchar(40) ,--用户密码
@adminnewpassword varchar(40)
as
update administrator set adminpassword = @adminnewpassword where adminname=@adminname
第五个 :删除 delete
ALTER proc [dbo].[dingdan_del]
@dingdanid int
as
delete dingdan where dingdanid=@dingdanid 展开
ALTER proc [dbo].[admin_select]
as
select * from administrator
第二个:登录
ALTER proc [dbo].[admin_denlu]
@adminname varchar(20),
@adminpassword varchar(40),
@powername varchar(20)
as
select adminid from administrator where adminname = @adminname and adminpassword= @adminpassword and powername=@powername
第三个:add增加
ALTER proc [dbo].[admin_add]
@adminid int,
@adminname varchar(20),
@adminpassword varchar(40),
@powername varchar(20)
as
if not exists(select adminname from administrator where adminname=@adminname)
begin
insert into administrator(adminname,adminpassword,powername)values(@adminname,@adminpassword,@powername)
end
第四个:update更新
ALTER proc [dbo].[admin_update]
@adminname varchar(20), --用户名
@adminpassword varchar(40) ,--用户密码
@adminnewpassword varchar(40)
as
update administrator set adminpassword = @adminnewpassword where adminname=@adminname
第五个 :删除 delete
ALTER proc [dbo].[dingdan_del]
@dingdanid int
as
delete dingdan where dingdanid=@dingdanid 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询