Created
January 15, 2020 10:54
-
-
Save sakakendo/f4d1a07083aea682a1536281327394df 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 database OrderDB; | |
show databases; | |
use OrderDB; | |
use OrderDB; | |
create table OrderT( | |
OrderID char(5) primary key, | |
OData date not null, | |
OCorpID char(4) not null | |
); | |
create table CorpT( | |
CorpID char(4) primary key, | |
CorpName varchar(20) not null, | |
CorpAddr varchar(100) | |
); | |
create table DetailT( | |
OrderID char(5), | |
Item varchar(20) not null, | |
Price int unsigned not null, | |
Qty smallint unsigned not null, | |
primary key(OrderID, Item) | |
); | |
show columns from OrderT; | |
show columns from CorpT; | |
show columns from DetailT; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment