--创建表create table text(sid number not null primary key,sname varchar(10),school varchar(10))--创建新增create or replace procedure proc_insert(i_sid in number,i_sname in varchar2,i_school in varchar2)isbegininsert into scott.text(sid,sname,school) values(i_sid,i_sname,i_school);commit;end;--调用call proc_insert(110,'静静','hello');--创建更新create or replace procedure proc_update(u_sid in nummber,u_sname varchar2,u_school varchar2)isbeginupdate scott.text set sname=u_sname,school=u_school where sid=u_sid;end;--调用call proc_update(110,'静静啊','纸张');--创建查询create or replace procedure proc_select(s_sid in number)iss_sname varchar2;s_school varchar2;beginselect sname,school into s_sname,s_school from scott.text where sid=s_sid;end;--调用call proc_select(110);--创建删除create or replace procedure proc_delete(d_sid in number)isbegindelete from scott.text where sid=d_sid;end;--调用call proc_delete(110);这样写对么
1 回答
- 1 回答
- 0 关注
- 2235 浏览
添加回答
举报
0/150
提交
取消