Search This Blog

Monday, July 27, 2015

INSERT SQL Server Example

SQL Server > DML > INSERT

INSERT adds one or more rows to a table or a view.


  • When insert data into a view, the view must reference exactly one base table in the FROM clause of the view. 
  • When insert into a multi-table view you must use a column list that references only columns from one base table. 


Example


INSERT INTO Sales (ProductName, Price, [Date])
VALUES ('Product1', 200, GETDATE());