Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Creating a new column in a Table

Author  Topic 

spinoza
Starting Member

49 Posts

Posted - 2006-01-25 : 10:48:57
I have created new columns fields in a table using EManager. However, I am wondering Which command do we use to create columns through the analyser??? Is it the same like the "Insert into"?

X002548
Not Just a Number

15586 Posts

Posted - 2006-01-25 : 10:55:30
Do you remeber when it asked you if you wanted to save the script of changes?

Just say yes (or look at the save change script menu button on your tool bar. You will see the code...

But it is an ALTER TABLE statement



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam
Go to Top of Page

spinoza
Starting Member

49 Posts

Posted - 2006-01-25 : 11:15:36
you probably confuse me with someone else...But in any case thank you very much...

But I aggre with that...Memory is like a woman... it is very easy to forget her :)
Go to Top of Page

Vatsan
Starting Member

7 Posts

Posted - 2006-01-25 : 15:06:40
EManager makes things simple if the change has to be done only once. If we have to do some routine JOB then we can go for SQL used in procedures.
Try using the following syntax to add a new column to your existing Table.


SYNTAX:

"ALTER TABLE <table name> ADD <column name> <datatype>"

EXAMPLE:

ALTER TABLE customer ADD customer_region varchar(30)

Go to Top of Page
   

- Advertisement -