473,394 Members | 2,052 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

MSSQL View SQL from GUI

In Oracle, as I'm using the GUI to create tables, I can also look at older tables and the SQL it would take to create those tables again. Does MSSQL 2005 have this same feature anywhere in the Management Studio? I ask because I need to create a large number of tables that already exist in this database in a different place, so it would be nice if I could just view the script it would take to create these tables rather than having to write all the script from scratch myself. Any help would be appreciated.
Mar 21 '08 #1
1 2113
ck9663
2,878 Expert 2GB
In Oracle, as I'm using the GUI to create tables, I can also look at older tables and the SQL it would take to create those tables again. Does MSSQL 2005 have this same feature anywhere in the Management Studio? I ask because I need to create a large number of tables that already exist in this database in a different place, so it would be nice if I could just view the script it would take to create these tables rather than having to write all the script from scratch myself. Any help would be appreciated.
Open Management Studio. Connect to your server. Go to your database. Expand Tables. Right Click on the table that you want. Choose CREATE to. Then choose where you want the script to go.

How many tables are we talking about? It might be faster if you just copy the database and truncate all the tables. Or go to the source database and do a

Expand|Select|Wrap|Line Numbers
  1. select * into newdb..newtable from olddb..oldtable where 1 = 2
-- CK
Mar 21 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: badz | last post by:
Hi frenz Lately I try to use MSSQL and PHP , the problem arise when PHP try to read MSSQL field with 'image' data type, header("Content-type: image/jpeg"); // act as a jpg file to browser I...
7
by: mj | last post by:
Hello, thanks for the help. I am running a WinXP Pro w/ SP2 (my home computer, with ZoneAlarm firewall) Apache 2.0.52 MySQL 4.1.7 PHP 5.1.0-dev I have developed a PHP/MySQL web app that...
3
by: Mike Jutras | last post by:
Hi, I would like to know if it is possible to access an mssql table, find a record and set a DOS variable from a matching field. My environment is very limited, I boot from PXE and I use a TFTP...
14
by: Kukurydz | last post by:
I've got such problem: My database is stored on MSSQL Server. I have to write reports for it in MSAccess. I've got a problem with creating a query which will select records from MSSQL table with...
2
by: larmores | last post by:
I have a medical database being exported to fixed-width text file and then need to ftp. I have a data source and can extract 6 of the seven tables via a Transform Data Task connected to a Text File...
24
by: rogynskyy | last post by:
Hi guys, I have to run a simple query on a MSSQL 2000. I'm new to database usage. I need to create a view with the following table columns LIST_PRICE decimal; MAP varchar(6);...
7
by: nick.bonadies | last post by:
I'm trying to deal with user inputs of single quotes into form fields that get input into a MSSQL database. So far I have discovered that if I turn on magic_quotes_sybase in my php.ini file PHP...
3
by: laural4705 | last post by:
Hi, I would like to know if this is possible, I have a sql table that has a paragraph in a varchar field. I can query the database and pull this field in, it renders perfectly, except for the php...
1
ssnaik84
by: ssnaik84 | last post by:
Hi Guys, Last year I got a chance to work with R&D team, which was working on DB scripts conversion.. Though there is migration tool available, it converts only tables and constraints.. Rest of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.