Add CREATE DOMAIN command
Can't define domains in SQL Server 2005 for data types.
Upvotes: 36<=-=Feb 17 2006 2:04PM=-=>
Thanks for the feedback. We’ll consider your input for planning of future release of SQL Server.<=-=Jul 19 2007 1:38AM=-=>
please consider ALTER DOMAIN, too.
This should allow minor changes to the domain (like changing the size of a char column) WITHOUT data loss.
This feature is a standard feature in ISO SQL and is well used in case tool like Power AMC while modeling the datas. Its a feature that can optimize the data model by fixing globally the types of informations across the tables that will result of no implicit cast while using two columns in a join wich can have been differently created in two different tables. Example : column name in table customer as varchar(25) and column name in table employee as nchar(32). This would be avoided by using a NAME SQL domain to create thos columns !
Also don’t forget the DROP DOMAIN !
A +<=-=Nov 15 2008 7:44AM=-=>
Please, don’t forget to use the same terms (words) in the SMO documentation than in the Transact-SQL documentation : it is a real problem for XML Schema and it is really annoying
The problem with the demand about default value is that’s a depreciated feature in Sql Server 2005