1. To truncate data from all tables use this command=
EXEC sp_MSForEachTable 'TRUNCATE TABLE ?'
2. To copy Table Structure from one table to new table
EXEC sp_MSForEachTable 'TRUNCATE TABLE ?'
2. To copy Table Structure from one table to new table
Select * into New_Table from Old_Table where 1 = 0
3.For date selection through query
Select CONVERT(VARCHAR(10), column_name, 3) as column_name
No comments:
Post a Comment