carlosmunozledesma
9/2/2016 - 10:18 AM

create, insert, update and delete in DB

create, insert, update and delete in 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;