SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
create table tbl_trainer( tr_id int primary key, tr_name varchar(10), tr_rank int, tr_grade decimal(6,4), tr_bdate date ); create table tbl_monster( mns_id int primary key, mns_name varchar(50), mns_power decimal(6,4), tr_id int ); insert into tbl_trainer (tr_id, tr_name, tr_rank, tr_grade, tr_bdate) values (1, 'Ash', 1, 88, '1998-10-23'), (2, 'Isa', 2, 86, '2001-02-18'), (3, 'Gary', 1, 90, '1994-09-15'); insert into tbl_monster (mns_id, mns_name, mns_power, tr_id) values (1, 'Pika', 89, 1), (2, 'Bulba', 90, 1), (3, 'Poka', 87, 1), (4, 'Charman', 92, 3), (5, 'Amanwo', 87, 3); -- 1 select tr_name from tbl_trainer; -- 2 select tr_name from tbl_trainer where tr_bdate > '1994-01-01' and tr_bdate < '2000-12-31'; select * from tbl_monster;

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear