distal-attribute
distal-attribute
distal-attribute
distal-attribute

Error 1064 : SQL Syntax

User, date Message
Written by Sierra_Ex
3 years ago
Category: General
3 posts since Wed, 22 Jun 11
Good morning, i have MySQL 5.5.13 and HeidiSQL 6.0.0.3603, i'm learning MySQL togheter with HeidiSQL from a book, it's a basic tutorial, the problem is, after I create a localhost, a databank and try to create a table, I get the following error:

SQL Error 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' at line 13.

Here is the code from my Query:

OBS: Variables in Portuguese/BR

===//Code//==

Create Table CaixaMovimento
(
LancamentoCaixa integer primary key
not null auto_increment,
CodigoHistorico integer(3)
not null default 0,
Documento varchar(12)
not null default "",
Data date not null,
Valor real(7,2)
not null default 0.00
)
Type = innodb
;

==//End Code//==

Sorry if that's too noob, I'm getting started now, I also put in the instalation support for InnoDB data, what I'm doing wrong? Thanks a lot!
Written by ansgar
3 years ago
4793 posts since Fri, 07 Apr 06
You should update to the latest build (Help > Check for updates)
Written by Sierra_Ex
3 years ago
3 posts since Wed, 22 Jun 11
Thanks for aswwer anse, but the problem still persists, now I have HeidiSQL 6.0.0.3891, but the error 1064 is still happening.
Written by kalvaro
3 years ago
563 posts since Thu, 29 Nov 07
Your tutorial is very outdated. You should use ENGINE=InnoDB instead of

Type = innodb

:

The older TYPE option was synonymous with ENGINE. TYPE was deprecated in MySQL 4.0 and removed in MySQL 5.5. When upgrading to MySQL 5.5 or later, you must convert existing applications that rely on TYPE to use ENGINE instead.

http://dev.mysql.com/doc/refman/5.5/en/create-table.html
Written by Sierra_Ex
3 years ago
3 posts since Wed, 22 Jun 11
Thanks for anse and kalvaro, the error was really in Type, I've changed the word Type for Engine and it works.
Written by ansgar
3 years ago
4793 posts since Fri, 07 Apr 06
... and I thought that "type=..." was generated by HeidiSQL somewhere. D'oh
 

Please login to leave a reply, or register at first.