You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

12 lines
312 B

create table authors (
id IDENTITY PRIMARY KEY,
name VARCHAR(15) NOT NULL
);
create table books (
id IDENTITY PRIMARY KEY,
title VARCHAR(50) NOT NULL,
author_id BIGINT NOT NULL,
FOREIGN KEY(author_id) REFERENCES authors(id),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL
);