CREATE DATABASE 'Salon – BC123456789'
CREATE TABLE Employees(emp_id INTEGER NOT NULL PRIMARY KEY,emp_name VARCHAR2(20) NOT NULL,age INTEGER CHECK(age>=18),salary DECIMAL(10,2),commision DECIMAL(7,2),dep_id INTEGER FOREIGN KEY REFERENCES Department(dep_id));
CREATE TABLE Address (ad_id INTEGER NOT NULL PRIMARY KEY,emp_id INTEGER FOREIGN KEY REFERENCES Employees(emp_id),city VARCHAR2(10),country VARCHAR2(10));
CREATE TABLE Department (dep_id INTEGER NOT NULL PRIMARY KEY,dep_name VARCHAR2(20) DEFAULT 'General');
Comments
Leave a comment