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
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Altering field values

Author  Topic 

Grimor
Starting Member

1 Post

Posted - 2012-05-31 : 02:20:01
Hey guys, im trying to include an additional field in a table (tape) called media for which valid values will be T (for tape) or D (for DVD).
I'm just unsure as to what my next move should be?

ALTER TABLE Tape
ADD Media VARCHAR(50)

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2012-05-31 : 03:05:27
Add a check constraint

ADD Media CHAR(1) check (Media in 'T','D')

==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -