i am running the following mysql command but it gave a strange error
the command is:
CREATE TABLE SATURN.SCBCRSE
(
SCBCRSE_SUBJ_CODE VARCHAR2(4) NOT NULL,
SCBCRSE_CRSE_NUMB VARCHAR2(5) NOT NULL,
SCBCRSE_EFF_TERM VARCHAR2(6),
SCBCRSE_COLL_CODE VARCHAR2(2),
SCBCRSE_DIVS_CODE VARCHAR2(4 )
)
TABLESPACE DEVELOPMENT
PCTUSED 0
PCTFREE 10
INITRANS 1
MA开发者_高级运维XTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
)
LOGGING
NOCOMPRESS
NOCACHE
NOPARALLEL
MONITORING;
the error is:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VARCHAR2(4) NOT NULL, SCBCRSE_CRSE_NUMB VARCHAR2(5) NOT NULL, ' at line 3
could you please help me
thanks in advance
This is not the CREATE TABLE
syntax of MySQL. I believe this is the Oracle's syntax. You may want to check the MySQL syntax here.
Good luck!
It's definitely an Oracle script you using. Oracle supports CHAR, NCHAR, NVARCHAR2 and VARCHAR2 whereas MySQL supports CHAR and VARCHAR. You can probably also remove everything from Tablespace onwards. Tablespace can be used from MySQL 5.1 onwards but it still isn't as straightforward as with Oracle.
精彩评论