create tables in sql

Upload: meethipotter

Post on 08-Mar-2016

224 views

Category:

Documents


0 download

DESCRIPTION

how to create tables in sql and change various attributes and assign primary and foreign keys in the table

TRANSCRIPT

  • create table suchi1(id number(4) constraint hr_s1_id_pk primary key,name varchar2(20) not null,hiredt date default '04-jan-16',email varchar(20) constraint hr_s1_email_u unique);

    create table suchi2(id number(4),salary number(6) not null,depid number(4));

    create table suchi3(ilc number(1) constraint hr_s3_ilc_c check (ilc>5 and ilc