What is the difference between column level constraints and
table level constraints?
Answer Posted / chaitu
If constraint is defined at the column definition(refer the below exmpls) then it is known to be column level, where as table leevel constraints is defined at the especially incase of composite primary key or composite foriegn key.
Examples
----------
CREATE TABLE CLASS ( ROOM NUMBER(10) CONSTRAINT ID CHECK (ID BETWEEN 1 AND 2000),
..........
.........
........
.........);
Table level
==================
CREATE TABLE CLASS (
ROOM NUMBER(10) ,
SUBJECT VARCHAR2(200),
CODE VARCHAR2(50) NOT NULL, /* Column level constraint*/
ID NUMBER(8,2),
CLASS_DATE DATE,
CONSTRAINT PK_1 PRIMARY KEY (ROOM)); /* table level
| Is This Answer Correct ? | 30 Yes | 9 No |
Post New Answer View All Answers
How to list all indexes in your schema?
How to store pictures on to the database?
How would you best determine why your MVIEW couldnt FAST REFRESH?
Why do we use coalesce function in oracle?
Can any one explain me when i execute below query.. select months_between('07-JUL-12','10-FEB-12') from dual; Out put:- 4.90322581 How oracle calculate?
How to create a table index?
What is a cursor variable?
What is a select query statement in oracle?
How do we display rows from the table without duplicates?
Which is better Oracle or MS SQL? Why?
definition of cluster and non-clustered index?
In what script is snap$ created? In what script is the scott/tiger schema created?
How to drop an index?
What are the ways tablespaces can be managed and how do they differ?
How to define a data field as not null?