0

I found how to make sql developer connect to a mysql server and then I made a database. The problem I now have is that I cannot add my tables to it. Is it a syntax problem or am I doing something wrong? I have used (use database;) but now I see and error on some lines. Like in line 352, but it looks fine....

CREATE TABLE acctmanager

(amid VARCHAR2(4) PRIMARY KEY,

amfirst VARCHAR2(12)  NOT NULL,

amlast VARCHAR2(12)  NOT NULL,

amedate DATE DEFAULT SYSDATE,

region CHAR(2) NOT NULL);

enter image description here

1
  • 2
    Yes, it's multiple syntax problems. You're using mssql syntax. There is no varchar2 type in mysql, nor is default sysdate valid. Commented Jan 17, 2014 at 2:43

1 Answer 1

1

there is no varchar2 in MySQL

replace varchar2 with varchar

Sign up to request clarification or add additional context in comments.

1 Comment

I have use database; in line 1 but now its telling me...Error starting at line : 1 in command - use sqlclass_books Error at Command Line : 1 Column : 1 Error report - SQL Error: No operations allowed after connection closed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.