Error 1064 : SQL Syntax

[expired user #5780]'s profile image [expired user #5780] posted 13 years ago in General Permalink
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!
ansgar's profile image ansgar posted 13 years ago Permalink
You should update to the latest build (Help > Check for updates)
[expired user #5780]'s profile image [expired user #5780] posted 13 years ago Permalink
Thanks for aswwer anse, but the problem still persists, now I have HeidiSQL 6.0.0.3891, but the error 1064 is still happening.
kalvaro's profile image kalvaro posted 13 years ago Permalink
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
[expired user #5780]'s profile image [expired user #5780] posted 13 years ago Permalink
Thanks for anse and kalvaro, the error was really in Type, I've changed the word Type for Engine and it works.
ansgar's profile image ansgar posted 13 years ago Permalink
... and I thought that "type=..." was generated by HeidiSQL somewhere. D'oh
[expired user #8424]'s profile image [expired user #8424] posted 10 years ago Permalink
thanks for the fix, i want to know which file shuold i to change TYPE to ENGINE.
kalvaro's profile image kalvaro posted 10 years ago Permalink
@aoi Whatever your problem is, please don't reuse a thread that's three years old and you've possibly didn't even read.
[expired user #8424]'s profile image [expired user #8424] posted 10 years ago Permalink
e, i just want to resolve my problem. and i do read every reply, but i am not familiar with mysql. so, maybe i did't understand these reply exactly.

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