sql 在DB中创建,插入,更新和删除
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sql 在DB中创建,插入,更新和删除相关的知识,希望对你有一定的参考价值。
#create
CREATE TABLE dbo.Products
(ProductID int PRIMARY KEY NOT NULL,
ProductName varchar(25) NOT NULL,
Price money NULL,
ProductDescription text NULL)
#insert
INSERT dbo.Products (ProductID, ProductName, Price, ProductDescription)
VALUES (1, 'Clamp', 12.48, 'Workbench clamp')
#update
UPDATE dbo.Products
SET ProductName = 'Flat Head Screwdriver'
WHERE ProductID = 50
#delete fila
DELETE FROM Production.ProductCostHistory
WHERE StandardCost > 1000.00;
以上是关于sql 在DB中创建,插入,更新和删除的主要内容,如果未能解决你的问题,请参考以下文章