Skip to content

Instantly share code, notes, and snippets.

@harrylog
harrylog / SQL_COOKBOOK_TABLE.sql
Created January 9, 2025 16:43 — forked from YujiShen/SQL_COOKBOOK_TABLE.sql
Table EMP and DEPT of SQL Cookbook for MySQL
-- Thanks to http://justinsomnia.org/2009/04/the-emp-and-dept-tables-for-mysql/
DROP TABLE IF EXISTS emp;
CREATE TABLE emp (
empno decimal(4,0) NOT NULL,
ename varchar(10) default NULL,
job varchar(9) default NULL,
mgr decimal(4,0) default NULL,
hiredate date default NULL,