skip to Main Content

Mysql – Why Can't create table in this way?

I have a set of sql statements, CREATE TABLE PRICING( CodeVillage INT, TypeCabin INT, CodeSeason CHAR(2), WeekPrice INT, PRIMARY KEY(CodeVillage, TypeCabin, CodeSeason) ); CREATE TABLE SEASON( CodeSeason CHAR(2) PRIMARY KEY, NameSeason VARCHAR(20), CONSTRAINT Fk_Pricing_CodeSeason Foreign KEY (CodeSeason) REFERENCES PRICING(CodeSeason) );…

VIEW QUESTION

Postgresql – Insert Query with expected logic to bifurcate table

I have a table CREATE TABLE consumer_occurrence_restoration_times ( consumer_id INT, start_time TIMESTAMP, end_time TIMESTAMP ); where the data is INSERT INTO consumer_occurrence_restoration_times (consumer_id, start_time, end_time) VALUES (1, '2023-09-24 20:00:00', '2023-09-25 12:00:00'), (2, '2023-09-24 21:00:00', '2023-09-25 13:00:00'), (1, '2023-09-26 20:00:00', '2023-09-28…

VIEW QUESTION
Back To Top
Search