csudijo/lekerdezesek/create_table.sql

21 lines
376 B
MySQL
Raw Normal View History

2023-10-03 05:57:37 +00:00
CREATE TABLE kategoriak (
id INT PRIMARY KEY,
nev INT
);
CREATE TABLE rendelesek (
id INT PRIMARY KEY,
mennyiseg DECIMAL,
afakulcs DECIMAL,
datum DATE
);
CREATE TABLE termekek (
id INT PRIMARY KEY,
nev VARCHAR(255),
egysegar INT,
etel INT,
kategoriaId INT,
rendelesek INT,
FOREIGN KEY(kategoriaId) REFERENCES katerologiak(id)
);