2017-12-26 4 views
0

SQL fehlt wirft einen Fehler bei der "Rang" Feld sagen Rang int * (2) rechte KlammerORACLE SQL 10g rechte Klammer

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') 

enter image description here

+0

Entweder 'int' oder' number (2) '. –

+0

Bitte lesen Sie http://meta.stackoverflow.com/questions/285551/why-may-i-not-upload-images-of-code-on-so-when-asking-a-question/285557 und die angenommene Antwort –

Antwort

1

entfernen Präzision fehlt; es ist nur "INT", nicht "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>