Hi! Could we please enable some services and cookies to improve your experience and our website?

SQLize | PHPize | SQLtest

Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code

A A A
Login    Share code      Blog   FAQ
Copy Format Clear
Create table employee ( employee_id int auto_increment primary key, first_name varchar(50), last_name varchar(50), email varchar(50) unique, hire_date date, salary decimal(4,2), department_id int); alter table employee add column phone_number varchar(20); select * from employee; alter table employee drop column phone_number; select * from employee; Create table departments (department_id int primary key, department_name varchar(50), location varchar(50)); select * from departments; alter table employee add constraint fk_department foreign key (department_id) references departments(department_id));

Stuck with a problem? Got Error? Ask AI support!

Copy Clear