Professional Documents
Culture Documents
table created.
--------------------------
no not null
--------------------------------------------------------
copy the asp table to asp1
--------------------------------------------------------
table created.
--------------------------
no
--------------------------------------------------------
can't copy the primary ker to asp1
--------------------------------------------------------
table created.
-----------------------------------------
no not null
-----------------------------------------------------------
copy the asp table to asp1
-----------------------------------------------------------
table created.
---------------------------------
no not null
-----------------------------------------------------
not null constraints shuld copy to another table
-----------------------------------------------------
//unique
table created.
-----------------------------
no
---------------------------------------------
copy the table
---------------------------------------------
table created.
-------------------------------
no
1 row created.
sql> /
enter value for no: 1
old 1: insert into asp values('&no')
new 1: insert into asp values('1')
insert into asp values('1')
*
error at line 1:
ora-00001: unique constraint (ponnusamy.sys_c003027) violated
sql> /
enter value for no: 2
old 1: insert into asp values('&no')
new 1: insert into asp values('2')
1 row created.
//insert the values for asp1
sql> insert into asp1 values('&no');
enter value for no: 1
old 1: insert into asp1 values('&no')
new 1: insert into asp1 values('1')
1 row created.
sql> /
enter value for no: 1
old 1: insert into asp1 values('&no')
new 1: insert into asp1 values('1')
1 row created.
----------------------------------------------------------------
unique constraints should not copy
----------------------------------------------------------------
//check constraints
table created.
1 row created.
sql> /
enter value for no: 2
old 1: insert into asp values('&no')
new 1: insert into asp values('2')
insert into asp values('2')
*
error at line 1:
ora-02290: check constraint (ponnusamy.sys_c003028) violated
sql> /
enter value for no: 0
old 1: insert into asp values('&no')
new 1: insert into asp values('0')
1 row created.
-----------------------------
copy the table
-----------------------------
table created.
1 row created.
sql> /
enter value for no: 2
old 1: insert into asp1 values('&no')
new 1: insert into asp1 values('2')
1 row created.
sql> /
enter value for no: 3
old 1: insert into asp1 values('&no')
new 1: insert into asp1 values('3')
1 row created.
no
----------
1
0
1
2
3
-----------------------------------------------------
check constraints shoult not copy
------------------------------------------------------