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 Administration
 create constarint for an existing column

Author  Topic 

morrgray
Starting Member

7 Posts

Posted - 2011-10-04 : 16:45:03
Hi, anyone can help me to create a constraint to column "room" form table "hotel" with ('single', 'double','family')?
Dont know why I cannot use CREATE DOMAIN in my sql

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-10-04 : 16:49:41
Take a look at ALTER TABLE in Books Online.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2011-10-04 : 18:59:01
quote:
Originally posted by morrgray

Dont know why I cannot use CREATE DOMAIN in my sql


Because it's an PosgreSQL command, not an MS SQL Server one.

--
Gail Shaw
SQL Server MVP
Go to Top of Page

morrgray
Starting Member

7 Posts

Posted - 2011-10-05 : 12:14:01
Hi Gail
I use MySQL, what should i do with it if i want to alter column
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2011-10-05 : 12:21:27
You could start by posting on a MySQL forum, or looking in the MySQL documentation.
http://forums.mySQL.com
http://dev.mysql.com/doc/refman/5.6/en/table-constraints-table.html

This site is a MS SQL Server site. We're familiar with SQL Server, not MySQL, not Oracle, not PosgreSQL.

--
Gail Shaw
SQL Server MVP
Go to Top of Page
   

- Advertisement -