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 staff like sakila.staff; insert into staff select * from sakila.staff;; INSERT INTO staff (first_name, last_name, address_id, email, username, password, store_id, active) SELECT c.first_name, c.last_name, c.address_id, CONCAT(LOWER(c.first_name), '.', LOWER(c.last_name), '@sakilastaff.com') AS email, LOWER(c.first_name) AS username, '8cb2237d0679ca88db6464eac60da96345513964' AS password, 2 AS store_id, -- филиал номер 2 1 AS active -- активен FROM customer c WHERE c.first_name = 'Colleen' AND c.last_name = 'Burton'; ; select staff_id, first_name, last_name, address_id, email, store_id, active, username, password from staff order by staff_id;

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear