Default char value
SQL> create table t
2 (id number primary key,
3 status char(1) default 'Y')
4 /
Table created.
SQL>
SQL> create sequence s;
Sequence created.
SQL>
SQL> insert into t
2 (id)
3 values(s.nextval);
1 row created.
SQL> /
1 row created.
SQL> /
1 row created.
SQL> /
1 row created.
SQL>
SQL> insert into t
2 (id, status)
3 values(s.nextval, 'N');
1 row created.
SQL> /
1 row created.
SQL> /
1 row created.
SQL> /
1 row created.
SQL>
SQL> commit;
Commit complete.
SQL>
SQL> drop table t;
Table dropped.
SQL> drop sequence s;
Sequence dropped.
SQL>
Related examples in the same category