Рет қаралды 104
How to create table (s) with relation in Oracle Database ?
#education #oracle #plsql #sqlplus #databasemanagement #oracledatabasetutorial
LEARNING OUTCOME:
1. CREATE TABLE USING SQL
2. SET CONSTRAINT
3. CREATE A RELATIONAL DATABASE
4. PRACTICE OF CREATE TABLE COMMAND, DESC COMMAND, PRIMARY KEY, FOREIGN KEY AND NOT NULL CONSTRAINT
SQL CODES :
//DEPARTMENT TABLE
CREATE TABLE department
(
dept_id varchar2(5) primary key,
dept_name varchar2(25) not null
);
//PROGRAM TABLE
CREATE TABLE program
(
program_id varchar2(10) primary key,
program_name varchar2(30) not null,
dept_id varchar2(5),
constraint program_fk foreign key(dept_id) references department(dept_id)
);
Regards,
Md. Ahsan Arif
Department of Computer Science and Engineering
University of Scholars