--this in an SQL comment 
--this code makes the authors table of the pubs database 
CREATE TABLE authors(
au_id VARCHAR2(11) NOT NULL,
au_lname VARCHAR2(40),
au_fname VARCHAR2(20),
phone VARCHAR2(12),
address VARCHAR2(40),
city VARCHAR2(20),
state CHAR(2) CHECK( state BETWEEN 'AK' AND 'WY'),
zip CHAR(5) CHECK(zip BETWEEN '00000' AND '99999'),
contract CHAR(5) CHECK(contract IN ('FALSE','TRUE')),
PRIMARY KEY(au_id));
---------------------------------------------------
--this code makes the titles table of the pubs database
CREATE TABLE titles(
title_id VARCHAR2(6) NOT NULL,
title VARCHAR2(80),
type VARCHAR2(12),
pub_id VARCHAR2(4),
price NUMBER(10,2),
advance NUMBER(10,2),
royalty NUMBER(10,0),
ytd_sales NUMBER(10,0),
notes VARCHAR(200),
pubdate DATE,
PRIMARY KEY(title_id));
----------------------------------------------------
--this code makes the titleauthor table of the pubs database
CREATE TABLE titleauthor(
au_id VARCHAR2(6) NOT NULL,
title_id VARCHAR2(6) NOT NULL,
au_ord NUMBER(5,0),
royaltyper NUMBER(10,0),
PRIMARY KEY(au_id,title_id),
FOREIGN KEY(au_id) REFERENCES authors,
FOREIGN KEY(title_id) REFERENCES titles);