Sql Server Faqs
Check this post for SQL Query to Return Information About all Databases in SQL Server
SQL Query to Return Information about a single database
Syntax:exec sp_helpdb databasename
ex:exec sp_helpdb lakshmi
Showing posts with label sqlserver. Show all posts
Showing posts with label sqlserver. Show all posts
How to Copy Structure of One Table into Another Table?
SQL Query to copy structure of one table to another table in SQL Server.
Syntax: Select * into Newtable from Oldtable where 1=2
Ex: Select * into emp1 from emp where 1=2
The above query copies only structure(not data) of emp to emp1.
SQL Query to get structure of table
Syntax: Select * into Newtable from Oldtable where 1=2
Ex: Select * into emp1 from emp where 1=2
The above query copies only structure(not data) of emp to emp1.
SQL Query to get structure of table
Subscribe to:
Posts (Atom)