Mega Code Archive

 
Categories / Oracle PLSQL Tutorial / Character String Functions
 

Use rpad function with define column default value

SQL> SQL> create table t   2  ( a int,   3    b varchar2(4000) default rpad('*',4000,'*'),   4    c varchar2(3000) default rpad('*',3000,'*' )   5  )   6  / Table created. SQL> SQL> insert into t (a) values ( 1); 1 row created. SQL> insert into t (a) values ( 2); 1 row created. SQL> insert into t (a) values ( 3); 1 row created. SQL> SQL> drop table t; Table dropped.