SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
create table address like sakila.address; insert into address select * from sakila.address; create table customer like sakila.customer; insert into customer select * from sakila.customer; create table city like sakila.city; insert into city select * from sakila.city; create table country like sakila.country; insert into country select * from sakila.country;; CREATE VIEW customer_address AS SELECT c.customer_id, c.first_name, c.last_name, a.address, ci.city, co.country FROM customer c JOIN address a ON c.address_id = a.address_id JOIN city ci ON a.city_id = ci.city_id JOIN country co ON ci.country_id = co.country_id; ; select * from customer_address order by customer_id;

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear