LAB EXPERIMENT6
LAB EXPERIMENT6
SYNTAX:
EXAMPLE:
Column5 DataType,
...
);
SYNTAX:
EXAMPLE:
Column2 DataType,
Column3 DataType,
ForeignKeyColumn DataType,
);
EXAMPLE:
LAB EXPERIMENT-7
SYNTAX:
EXAMPLE:
2. SELECT with GROUP BY and Aggregate Functions
SYNTAX:
EXAMPLE:
EXAMPLE:
LAB EXPERIMENT-8
1. Create a table called EMP with the following structure. Name Type EMPNO NUMBER
(6) ENAME VARCHAR2 (20) JOB VARCHAR2 (10) DEPTNO NUMBER (3) SAL NUMBER
(7,2) Allow NULL for all columns except ename and job.
SYNTAX:
CREATE TABLE table_name (column1 datatype CHECK (condition),column2 datatype NOT NULL,column3
datatype NOT NULL,column4 datatype UNIQUE,column5 datatype);
EXAMPLE:
2. Add constraints to check, while entering the empno value (i.e) empno > 100.
SYNTAX:
EXAMPLE:
EXAMPLE:
EXAMPLE: