Sponser Link

SQL Server Insert rows in table

If you want insert rows in sql server table like Microsoft excel, you can directly insert by using management studio but this is not professional way or not correct use of SQL server. For this purpose insert query option is available. Basic syntax of query is given below.


    INSERT INTO table1 (column1,column2)
    VALUES (value1,value2);

Now we will do insert the data in example table. We will insert the data in SaleDetail table.

     INSERT INTO SaleDetail (    
         customer_id,
         sale_date,
         TotalAmount
        )
        VALUES
         (
             4,
             Getdate(),
             450.85   
          );