I have a table with 100 records. Now I want to generate INSERT statements with the same data. How will you generate?

Open SSMS — Right click on Database — Tasks — Generate scripts — Next — Select specific database objects — select your table — Next — Select the output type — Advanced — Select data only from Types of data to script

Read More

What is Row constructor /Table valued constructor in SQL Server?

Row Constructor Row constructors is the new feature introduced in SQL Server 2008 to insert multiple rows by writing a single INSERT statement. It saves lot of time when we are inserting many records into a table. Ex: ———————————————————————————————————————– — Before SQL

Read More

How to transfer the whole data from one table to another table which does not exists in database?

SELECT INTO We can do it using SELECT INTO clause. Syntax: SELECT <Columns List> INTO <New Table Name> FROM <Existing Table Name> Ex: SELECT * INTO dbo.EmployeeBKP FROM dbo.Employee When you execute the above query, dbo.EmployeeBKP table will be created automatically with the

Read More