-
Hi Friends,
Can I use default contriant to assign sequence no. to
a column?
e.g.
CREATE TABLE EMP
(IDNO NUMBER DEFAULT SEQ1.NEXTVAL,
HIREDATE DATE DEFAULT SYSDATE,
NAME VARCHAR2(30) NOT NULL)
/
I got error in line #2.... but #3 works.
SOS please.
-
well, I can select both using DUAL....
SQL> SELECT SYSDATE FROM DUAL;
SYSDATE
---------
04-JUL-02
SQL> SELECT SEQ1.NEXTVAL FROM DUAL;
NEXTVAL
----------
1
-
No, sequence can not be referenced for default value for the column.
Sanjay
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|