Created
May 7, 2020 18:00
-
-
Save mz0/e18de9b49bb905bc3531a750feb78909 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE upMsg ( | |
id int, | |
msg varchar(31) | |
); | |
insert into upMsg values (1, "Foo"); | |
insert into upMsg values (2, "Bar"); | |
CREATE TABLE dnMsg ( | |
ni int not null auto_increment primary key, | |
id int not null, | |
reply varchar(30) | |
) ENGINE=InnoDB; | |
insert into dnMsg values (null, 1, "whatever, OK"); | |
CREATE TABLE drMsg ( | |
ri int not null auto_increment primary key, | |
id int not null, | |
error varchar(63) | |
) ENGINE=InnoDB; | |
insert into drMsg values (null, 2, 'no, no, no'); | |
insert into drMsg values (null, 2, null); | |
select * from upMsg | |
left join drMsg using(id); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment