Error 1064 : SQL Syntax

Sierra_Ex posted 6 years ago in General
Good morning, i have MySQL 5.5.13 and HeidiSQL, 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


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 posted 6 years ago
You should update to the latest build (Help > Check for updates)
Sierra_Ex posted 6 years ago
Thanks for aswwer anse, but the problem still persists, now I have HeidiSQL, but the error 1064 is still happening.
kalvaro posted 6 years ago
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.

Sierra_Ex posted 6 years ago
Thanks for anse and kalvaro, the error was really in Type, I've changed the word Type for Engine and it works.
ansgar posted 6 years ago
... and I thought that "type=..." was generated by HeidiSQL somewhere. D'oh
aoi posted 3 years ago
thanks for the fix, i want to know which file shuold i to change TYPE to ENGINE.
kalvaro posted 3 years ago
@aoi Whatever your problem is, please don't reuse a thread that's three years old and you've possibly didn't even read.
aoi posted 3 years ago
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.