i want insert multiple records at a time in sql server using insert query. please help me how will do it.

1 Answers

  1. Aditya Kumar Patel
    insert multiple records at a time in sql server priyanka patel
    8/1/2018 9:12:48 AM

    Try to use it:

    First create a table using following script:


    Create Table Customers
    CustomerID bigint primary key identity(1,1),
    CustomerName varchar(150),
    CustomerEmail varchar(100),
    CustomerContact varchar(50),
    CustomerAddress varchar(500)


    Insert multiple rows at a time in sql server by using following query:


    insert into Customers(CustomerName,CustomerEmail,CustomerContact,CustomerAddress)
    values('abhishek Patel','abhishek@sqltutorialspoint.com','752******','Allahabad')
              ,('aditya Patel','aditya@sqltutorialspoint.com','752******','Allahabad')
              ,('pankaj Patel','pankaj@sqltutorialspoint.com','752******','Allahabad')
              ,('vijay Patel','vijay@sqltutorialspoint.com','752******','Allahabad')
              ,('meen Patel','meen@sqltutorialspoint.com','752******','Allahabad')

    I hope it will help to you.

Leave a answer

Make sure you enter the (*) required information where indicated. HTML code is not allowed.

You may also like