To create a new table and load the data directly
select Param1
,Param2
,Param3
,Param4
,Param5
,Param6
,Param7
INTO New_Table_Name FROM
OLD_TABLE_NAME where month(created_on)=4
select Param1
,Param2
,Param3
,Param4
,Param5
,Param6
,Param7
INTO New_Table_Name FROM
OLD_TABLE_NAME where month(created_on)=4
SYSTEM_DATABASES | All system databases (master, msdb, and model) |
USER_DATABASES | All user databases |
ALL_DATABASES | All databases |
AVAILABILITY_GROUP_DATABASES | All databases in availability groups |
USER_DATABASES, -AVAILABILITY_GROUP_DATABASES | All user databases that are not in availability groups |
Db1 | The database Db1 |
Db1, Db2 | The databases Db1 and Db2 |
USER_DATABASES, -Db1 | All user databases, except Db1 |
%Db% | All databases that have “Db” in the name |
%Db%, -Db1 | All databases that have “Db” in the name, except Db1 |
ALL_DATABASES, -%Db% | All databases that do not have “Db” in the name |
BACKUP DATABASE [DMT] TO
DISK = N'/var/opt/mssql/data/DMT.bak'
WITH NOFORMAT, NOINIT, NAME = N'DMT-
Full Database Backup',
SKIP, NOREWIND,
NOUNLOAD,
STATS = 10
GO