The DDL statement ALTER DOMAIN can be used to change any aspect of an existing domain except its NOT NULL setting. Changes that you make to a domain definition affect all column definitions based on the domain that have not been overridden at the table level.
A domain can be altered by its creator, the SYSDBA user, or (on Linux/UNIX) any user with operating system root privileges.
Using ALTER DOMAIN you can
Here’s the syntax:
This statement sets a new default value for the BOOK_GROUP domain:ALTER DOMAIN BOOK_GROUP SET DEFAULT -1;
In this statement, the name of the BOOK_GROUP domain is changed to PUBL_GROUP:ALTER DOMAIN BOOK_GROUP TO PUBL_GROUP;
Constraints on Altering Data Types
The TYPE clause of ALTER DOMAIN allows the data type to be changed to another, permitted data type.
Any type conversion that could result in data loss is disallowed. For example, the number of characters in a domain could not be made smaller than the size of the largest value in any column that uses it.
Converting a numeric data type to a character type requires a minimum length for the character type.
The following statement changes the data type of a CHAR(80) domain, BOOK_TITLE, to VARCHAR(100):ALTER DOMAIN BOOK_TITLE TYPE VARCHAR(100);
Firebird Related Interview Questions
|RDBMS Interview Questions||MySQL Interview Questions|
|Linux Interview Questions||Mac OS X Deployment Interview Questions|
|Windows Administration Interview Questions||Windows Server 2003 Interview Questions|
|SQL Interview Questions||NoSQL Interview Questions|
|Advanced C++ Interview Questions|
All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.