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.
| Author |
Topic |
|
venkath
Posting Yak Master
202 Posts |
Posted - 2006-07-04 : 13:57:09
|
| Hi alli have a table lkp_Static_data ...How to add a column to the table with not null specificationThanks |
|
|
RyanRandall
Master Smack Fu Yak Hacker
1074 Posts |
Posted - 2006-07-04 : 14:21:15
|
| alter table lkp_Static_data add col varchar(10) not null default ''Ryan Randallwww.monsoonmalabar.com London-based IT consultancy Solutions are easy. Understanding the problem, now, that's the hard part. |
 |
|
|
venkath
Posting Yak Master
202 Posts |
Posted - 2006-07-04 : 14:47:52
|
| Thanks..But my scenarie is...ALTER TABLE LKP_STATIC_DATA_DETAIL ADD LIST_NAME NVARCHAR(50);ALTER TABLE LKP_STATIC_DATA_DETAIL ADD CODE NVARCHAR(80);ADD PRIMARY KEY LKP_STATIC_DATA_DETAIL_PK4 LKP_STATIC_DATA_DETAIL(LIST_NAME, CODE, CONTEXT_CODE, LANGUAGE_CODE);How can i do the above task...Help on this is greatly appreciated...Thanks |
 |
|
|
yogeshsr11
Starting Member
2 Posts |
Posted - 2006-07-04 : 19:15:36
|
| Just use the ALTER in the same script and GO after each DDL. If you want to add the newly created column in PK then do so at endYogesh Ranade |
 |
|
|
|
|
|