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

📄 truncatetables.sql

📁 基于微软的 ASP.NET+C#开发的PETSHOP(网上宠物店)项目,在性能及开发效率上明显优于基于SUN J2EE框架开发的PETSHOP. 项目包括所有源码及数据库建库脚本,是不错的学习 AS
💻 SQL
字号:
/******************************************************************************
**        File: TruncateTables.sql
**        Name: Benchmark Data Load
**        Desc: Remove the current data from the database in preparation
**              for the benchmark data load. If you want to restore the
**              original data, please see the DataPopulation.sql SQL script
**              (located in the Create Scripts folder).
**
**        Date: 11/6/2001
**
*******************************************************************************/

-- delete the contents of the Product table
PRINT 'Deleting Data: Product Table';
ALTER TABLE Item NOCHECK CONSTRAINT FK_Item_Product;
ALTER TABLE Product NOCHECK CONSTRAINT FK_Product_Category;
DELETE FROM Product
ALTER TABLE Product CHECK CONSTRAINT FK_Product_Category;
ALTER TABLE Item CHECK CONSTRAINT FK_Item_Product; 

-- delete the contents of the Item table
PRINT 'Deleting Data: Item Table';
ALTER TABLE Item NOCHECK CONSTRAINT FK_Item_Product;
ALTER TABLE Item NOCHECK CONSTRAINT FK_Item_Supplier;
DELETE FROM Item
ALTER TABLE Item CHECK CONSTRAINT FK_Item_Supplier;
ALTER TABLE Item CHECK CONSTRAINT FK_Item_Product;

-- delete the contents of the Inventory table
TRUNCATE TABLE Inventory

⌨️ 快捷键说明

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