SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
CREATE TABLE Books ( book_id SERIAL PRIMARY KEY, title VARCHAR(255) NOT NULL, author VARCHAR(255) NOT NULL ); -- Создание таблицы "Читатели" CREATE TABLE Readers ( reader_id SERIAL PRIMARY KEY, name VARCHAR(255) NOT NULL, age INTEGER NOT NULL ); -- Создание таблицы "Аренда" CREATE TABLE Rentals ( rental_id SERIAL PRIMARY KEY, reader_id INTEGER REFERENCES Readers(reader_id), book_id INTEGER REFERENCES Books(book_id), rental_date DATE NOT NULL ); drop table Books;

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear