Wednesday, January 31, 2018

Insert SQL 1 PM Class

Use Exampledb

Insert into Customer(CustomerID, CustomerLastName, 
CustomerFirstName, CustomerEmail)
Values(5,'Nelson','Jeb','JNelson@msn.com'),
(6,'Johnson','Leah','Ljohnson@hotmail.com'),
(7, 'Manning','Josh','Jmanning@outlook.com')

Select * From Customer

Insert into Sale(SaleDate, CustomerId)
Values(GetDate(),6)
Insert into SaleDetail(SaleNumber, ItemID, 
DiscountPercent)
Values (IDENT_CURRENT('Sale'), 3, .05)

Select * from Sale
Select * from SaleDetail

No comments:

Post a Comment