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 teacher( id int primary key, name varchar(64) ); create table student( teacher_id int, name varchar(64), foreign key (teacher_id) references teacher(id) ); insert into teacher (id, name) values (1, 'Teacher'); insert into student (teacher_id, name) values (1, 'Me'); select * from student s join teacher t on t.id = s.teacher_id ;

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

Copy Clear