Example:
Let, we have a table and there is a column named as hire_date which insert values automatically when we give an entry of a particular user or employee. Here the automatic column is hire_date which automatically insert the system date (SYSDATE) to the hire_date column of the table.
- ...... hire_date DATE DEFAULT SYSDATE, .....
Allowable DEFAULT values:
A default value can be one of the followings:
- literal values
- expression
- SQL function
- Example: SYSDATE, USER etc.
A default value can't be the followings:
- another column's name
- pseudocode
- Example: NEXTVAL, CURRVAL, ROWNUM etc.
A default expression must match the data type of the current column.



No comments:
Post a Comment