SQL的存储过程语句,查询插入删除修改语句.docx

上传人:小飞机 文档编号:3166172 上传时间:2023-03-11 格式:DOCX 页数:2 大小:36.38KB
返回 下载 相关 举报
SQL的存储过程语句,查询插入删除修改语句.docx_第1页
第1页 / 共2页
SQL的存储过程语句,查询插入删除修改语句.docx_第2页
第2页 / 共2页
亲,该文档总共2页,全部预览完了,如果喜欢就下载吧!
资源描述

《SQL的存储过程语句,查询插入删除修改语句.docx》由会员分享,可在线阅读,更多相关《SQL的存储过程语句,查询插入删除修改语句.docx(2页珍藏版)》请在三一办公上搜索。

1、SQL的存储过程语句,查询插入删除修改语句2、创建存储过程 Custom表: CREATEPROCEDUREcustomshow as SELECTcid=id,ccname=cname,cdepartID=departID,cage=age,cename=ename,cpassword=password fromcustom CREATEPROCEDUREcustomquery(cidint) as SELECTid,cname,departID,age,ename,password fromcustom whereid=cid CREATEPROCEDUREcustominsert(cid

2、int,ccnamenvarchar(50),cdepartIDint,cageint,cenamenvarchar(50),cpasswordnvarchar(50) as INSERTintocustomVALUES(cid,ccname,cdepartID,cage,cename,cpassword) CREATEPROCEDUREcustomdelete(cidint) as DELETEFROMcustom whereid=cid CREATEPROCEDUREcustomupdate(cidint,ccnamenvarchar(50),cdepartIDint,cageint,ce

3、namenvarchar(50),cpasswordnvarchar(50) as UPDATEcustom SETcname=ccname,departID=cdepartID,age=cage,ename=cename,password=cpassword where id=cid CREATEPROCEDUREdepartmentshow as SELECTid,departname,description fromdepartment CREATEPROCEDUREdepartmentquery(didint) as SELECTid,departname,description fr

4、omdepartment whereid=did CREATEPROCEDUREdepartmentinsert(didint,ddepartnamenvarchar(50),ddescriptionnchar(10) as INSERTintodepartmentVALUES(did,ddepartname,ddescription) CREATEPROCEDUREdepartmentdelete(didint) as DELETEFROMdepartment whereid=did CREATEPROCEDUREdepartmentupdate(didint,ddepartnamenvarchar(50),ddescriptionnchar(10) as UPDATEdepartment SETid=did,departname=ddepartname,description=ddescription

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 生活休闲 > 在线阅读


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号