SQLPLUS says I have missing left parenthesis with this statement in my sql script..
CREATE TABLE people(
id INT NOT NULL PRIMARY KEY,
name VARCHAR2
)
You are getting this error because you didn't specify the character with datatype varchar2. Try something like this:
CREATE TABLE people(
id INT NOT NULL PRIMARY KEY,
name VARCHAR2(20) );
You need to specify the size of Varchar2
.
For example:- Name Varchar2(50)
Note:- The maximum size of the Varchar2 is 4000.
VARCHAR2 is a type that needs a maximum size/length. Try something like...
varchar2(50)
Your missing left parenthesis is the parenthesis that surrounds the size.
CREATE TABLE people(
id INT NOT NULL PRIMARY KEY,
name VARCHAR2(50)
);
You need to specify a size for the VARCHAR2 data type.
E.g. VARCHAR2(30)
SQL*Plus is looking for the brackets around the VARCHAR2 size definition.