Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

how to Create scripts with sql 2005 to create table and fields and also to add fields to  existing tables ....

Posted on 2007-02-19
5
Medium Priority
?
1,935 Views
Last Modified: 2013-11-26
Hi Experts,
 how to Create scripts with sql 2005 to create table and fields and also to add fields to  existing tables .


Regards.
0
Comment
Question by:anusdesai
5 Comments
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 18564208
create table PutSomeTableNameHere ( field1  varchar(100), filed2 int, field3  bit)

in order to alter the existing tables use


ALTER TABLE putTableName
ADD someOtherColumn  int
0
 

Author Comment

by:anusdesai
ID: 18564242
This to to create table..but hoew to generate script of this so that my client can run on his machine to create tables in his database....
0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 18564431
with SQL Server, you can open Enterprise Manager, drill down to the Table level, the Right Click on each table, and choose Generate SQL Script - this will generate the necessary SQL to create the Table Schema, when executed on as New SQL Server instance.

Is that what you are after?

AW
0
 
LVL 3

Accepted Solution

by:
kpcurley earned 2000 total points
ID: 18564461
in SQL Server 2005 Management Studio go to each table, right-click > Script Table as > CREATE To > ...File
0
 

Author Comment

by:anusdesai
ID: 18564624
be right back.....
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question