Closed. This question is not reproducible or was caused by typos . It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 3 days ago.
Improve this question
CREATE TABLE IF NOT EXISTS OLYMPIC_HISTORY;
(
id INT PRIMARY KEY,
name VARCHAR,
sex VARCHAR,
age VARCHAR,
height VARCHAR,
weight VARCHAR,
team VARCHAR,
noc VARCHAR,
games VARCHAR,
year INT,
season VARCHAR,
city VARCHAR,
sport VARCHAR,
event VARCHAR,
medal VARCHAR
);
Error:
A Table must have at least one visible column
How to fix the error and process too?
1条答案
按热度按时间p8ekf7hl1#
You have following issues:
varchar(100)
instead ofvarchar
onlyYear
andEvent
should not be used as column name because they are SQL key words. This can cause further problems.Issue 1 and 2 must be solved, otherwise your create table command will fail.
Issue 3 should be solved in order to avoid further difficulties.
So a correct create table command will be something like this:
Furthermore, it is strange you want almost all columns to be varchar. Columns like the age, height or weight are usually numeric. Mabye you should change this, too.