Insert-Queries
*How to use insert query ?
The insert query useful when you want to add records to your table .

Basic Syntax : 
INSERT INTO table_name (column1, column2, ...)
VALUES (value1, value2, ...);

Here, table_name is the name of the table you want to add data to. The columns are the specific fields (like name, age, etc.), and VALUES are the data you want to insert.



Above query will add a new row to table CountryMaster

*Insert data into all columns :
If you want to insert data into all columns of a table, you can just list the values in the same order as the columns.

Insert into CountryMaster (CountryName,CreatedDate,CreatedBy
,ModifiedDate,ModifiedBy,IsActive)
Values('Test Country',GETDATE(),'U001',null,null,1)

* Insert Data Without Specifying Columns

If you are inserting data into every column and the columns have the same order as the table, you don’t need to list the column names.

Insert into CountryMaster
Values('Test Country',GETDATE(),'U001',null,null,1)

*Insert multiple rows at once 

Insert into CountryMaster
Values('Test Country',GETDATE(),'U001',null,null,1)
,('Test Country1',GETDATE(),'U001',null,null,1)
,('Test Country2',GETDATE(),'U001',null,null,1)
,('Test Country3',GETDATE(),'U001',null,null,1)


This will insert three new rows into the CountryMaster table in one go.

*Keep Backup of Existing Table 
I have table CountryMaster and need to get all existing record to another new table.
Select * into CountryMaster_bkp06072025 from CountryMaster

.