My First SQL Practice - To Create Table
My First SQL Practice - To Create Table
My First SQL Practice - To Create Table
Your Task:
Given the sample data, create the tables below in MYSQL WORKBENCH.
If you are able to produce the sample output as attached here, CONGRATULATIONS !!!!!
CREATE DATABASE ORG;
SHOW DATABASES;
USE ORG;
FIRST_NAME CHAR(25),
LAST_NAME CHAR(25),
SALARY INT(15),
JOINING_DATE DATETIME,
DEPARTMENT CHAR(25)
);
WORKER_REF_ID INT,
BONUS_AMOUNT INT(10),
BONUS_DATE DATETIME,
REFERENCES Worker(WORKER_ID)
ON DELETE CASCADE
);
WORKER_REF_ID INT,
WORKER_TITLE CHAR(25),
AFFECTED_FROM DATETIME,
REFERENCES Worker(WORKER_ID)
ON DELETE CASCADE
);
SAMPLE OUTPUT