4

I want to create a mysql table with this code:

create table geodb_type_names (
  type_id              integer not null,
  type_locale          varchar(5) not null,
  name                 varchar(255) not null,             /* varchar(500)? */
unique (type_id, type_locale)
) TYPE=InnoDB CHARACTER SET utf8;

It comes from a mysql dump for OpenGeoDb.

So I didn't create it by myself. If I include this statement in phpmyadmin I get this error message:

#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 'TYPE=InnoDB CHARACTER SET utf8' at line 10 

But I can't find the issue. Maybe someone can help me?

Thanks a lot.

2

1 Answer 1

7

TYPE is replaced by ENGINE. TYPE was deprecated in MySQL 4.0 and removed in MySQL 5.5.

Use this query:

create table geodb_type_names (
  type_id              integer not null,
  type_locale          varchar(5) not null,
  name                 varchar(255) not null,             /* varchar(500)? */
unique (type_id, type_locale)
) ENGINE=InnoDB CHARACTER SET utf8;
Sign up to request clarification or add additional context in comments.

1 Comment

Thank you. I'll try it in view minutes.

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.