PR 06 and 07
PR 06 and 07
constraint
Primary Key:
Most tables should have a primary key, and each table can have only
ONE primary key.
The following SQL enforces the "PId" column and the "Name" column
to not accept NULL values:
PID Name
1 AAAA
2 AAAA
3 BBBB
Operator Description
this operator is used to compare the value
ANY
in list according to the condition.
this operator is used to search for values, that are
BETWEEN
within a set of values
this operator is used to compare a value to that
IN
specified list value
Every attribute should have its own data type. Different data
types are used for different attributes these are- String (the
number, character and letter combination of data type). It has
different varieties like- graphic, character, clob, db- clob,
binary, etc; Numeric (data off numbers).
These include- integer, smallint, bigint, decimal, etc. and Date
time (data that include time and date). The values of different
data types would not be supported in an attribute.
Insert Command:-
1.Insert values into table give reference of other table
Syntax:-
insert into emp5 select * from emp2;
DEFAULT VALUES;
SELECT *
FROM demo;