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

SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular

SQLize.online is a free online SQL environment for quickly running, experimenting with and sharing code. You can run your SQL code on top of the most popular RDBMS including MySQL, MariaDB, SQLite, PostgreSQL, Oracle and Microsoft SQL Server.

Copy Format Clear
create table staff like sakila.staff; insert into staff select * from sakila.staff; create table department ( department_id int auto_increment primary key , name varchar(64) ); insert into department (name) values ('Management'),('Sales'); alter table staff add column department_id int; alter table staff add constraint FK_department_id Foreign Key (department_id) references department(department_id); update staff department_id = (select department_id from department where name = 'Sales')

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear