SQL在" rank“字段抛出一个错误,指出rank int*(2)缺少右括号
create table assassin
(
name varchar(20) primary key,
speciality varchar(50),
skills varchar(50),
codename varchar(50),
rank int(2)
);
insert into assassin
values
('John Wick','Hitman','Gun Fu','Babayaga','1'),
('Frank Moses','EX CIA CODE RED','Hand to hand combat and wepons training','RED Retired Extremely Dangerous','4'),
('Ethan Hunt','Spy','Infiltration','Hunt','3'),
('Natasha Romanof','Spy','Infiltration and Execution','Black Widow','2'),
('Eggsy','Kingsman Agent','Spy and Raw Agent','Galahad','2'),
('James Bond','Spy','Infiltration and execution','Bond','2')

发布于 2017-12-27 03:46:28
去掉精度;它只是"INT",不是"INT (2)":
SQL> create table test (rank int(2));
create table test (rank int(2))
*
ERROR at line 1:
ORA-00907: missing right parenthesis
SQL> create table test (rank int);
Table created.
SQL>https://stackoverflow.com/questions/47982834
复制相似问题