'Error in my code: Syntax error: Expected ")" or "," but got "(" [closed]
$ CREATE TABLE `2021.dates_times` (
ride_id STRING NOT NULL,
start_hour TIME NOT NULL,
start_day INT NOT NULL,
start_month INT NOT NULL,
end_hour TIME NOT NULL,
end_day INT NOT NULL,
end_month INT NOT NULL
PRIMARY KEY (ride_id)
)$
Solution 1:[1]
You have left a comma before primary key.Your code should be
CREATE TABLE 2021.dates_times ( ride_id STRING NOT NULL, start_hour TIME NOT NULL, start_day INT NOT NULL, start_month INT NOT NULL, end_hour TIME NOT NULL, end_day INT NOT NULL, end_month INT NOT NULL, PRIMARY KEY (ride_id) )
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Gopi Kumar Kaushik |
