⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 shoppercart_proc.sql

📁 java sql jsp javabean
💻 SQL
字号:

use Shopper
go
-- Disable the constraint and Re-enable the constraint.
-- 删除小类的存储过程
if exists(select name from sysobjects where name = 'proc_delSmallCategory')
	drop procedure proc_delSmallCategory
go
create procedure proc_delSmallCategory
@scid int
as 
alter table Products nocheck constraint FK_Products_SmallCategory
update Products set SmallCID = 0 where SmallCID = @scid
delete from SmallCategory where SCID = @scid
alter table Products check constraint FK_Products_SmallCategory
go


-- Disable the constraint and Re-enable the constraint.
-- 删除大类的存储过程
if exists(select name from sysobjects where name = 'proc_delCategory')
	drop procedure proc_delCategory
go
create procedure proc_delCategory
@cid int
as 
alter table SmallCategory nocheck constraint FK_SmallCategory_Category
update SmallCategory set CID = 0 where CID = @cid
delete from Category where CID = @cid
alter table SmallCategory check constraint FK_SmallCategory_Category
go

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -