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 penguins_by_islands ( island text unique not null, penguins_count int ); insert into penguins_by_islands select island, count(*) from penguins group by island; ; CREATE TRIGGER total_trigger AFTER DELETE ON penguins BEGIN UPDATE penguins_by_islands SET penguins_count = penguins_count - 1; END; ; delete from penguins where island = 'Biscoe'; select * from penguins_by_islands order by penguins_count;

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

Copy Clear