Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 8 years ago.
Improve this question
when I am going to fire query for creating table in mySQL 5.0 I got following exception java.sql.sqlexception incorrect information in file frm Please give me solution for this?
CREATE TABLE IF NOT EXISTS tmp_vpedutech (srno INT(10) NOT NULL,
TheGroup VARCHAR(50) NULL,
make VARCHAR(50) NULL,
model VARCHAR(50) NULL,
description VARCHAR(255) NULL,
quantity VARCHAR(50) NULL,
modelNotKnown boolean NULL );
java.sql.SQLException: Incorrect information in file: './erp_vpedutech/tmp_vpedutech.frm'
It's working fine in mysql 5.1
It's working fine in SQL Fiddle check that
Related
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 8 days ago.
Improve this question
I'm a beginner at mysql on linux (ubuntu 22.4), while checking a document with the basics i came across an example of how to create a primary key, but with the constraint keyword:
CREATE TABLE
Empleados (
IdEmpleado INTEGER CONSTRAINT IndicePrimario PRIMARY,
Nombre TEXT,
Apellidos TEXT,
FechaNacimiento DATETIME
)
But when i type the command, i get this error.
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CONSTRAINT indice PRIMARY KEY)' at line 1
I tried some modifications such as "int" instead of integer, or "primary key" instead of just primary, adding "not null" and so on, but is still the same error.
I already tried to search why is it wrong, but can't figure it out. If anyone could help, id appreciate
Try adding constraint separately as shown below,
CREATE TABLE Empleados (
IdEmpleado int NOT NULL,
Nombre varchar(255),
Apellidos varchar(255),
FechaNacimiento datetime,
CONSTRAINT IndicePrimario PRIMARY KEY (IdEmpleado)
);
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 8 years ago.
Improve this question
I have a database called "members" and in that there's a table called "test". I'm trying to add a column to the table "test" but am getting the following error
MySQL Error 1064: You have an error in your SQL syntax.
My SQL code:
ALTER TABLE 'test'
ADD COLUMN 'Email' VARCHAR(25)
NULL AFTER 'LastName';
alter table classtest add column Email varchar(25);
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 8 years ago.
Improve this question
i created a database for a nfl team. I created a table called players that holds bios info. Now i want to create a table called transactions that shows the trade transactions but players to the active roster based from the primary key of players. But i keep getting this error: ERROR 1064 (42000): 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 'KEY(idplayer) REFERENCES players(playersid))' at line 8.
`
create table transactions(
transid INT UNSIGNED NOT NULL AUTO_INCREMENT,
type VARCHAR(30),
fromteam VARCHAR(30),
toteam VARCHAR(30),
idplayer INT UNSIGNED NOT NULL,
PRIMARY KEY(transid),
FORIEGN KEY(idplayer) REFERENCES players(playersid));
Please could someone help me out on similar experiences.
I think you just misspelled FOREIGN :-)
Typo, change
FORIEGN KEY(idplayer) REFERENCES players(playersid));
to
FOREIGN KEY(idplayer) REFERENCES players(playersid));
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I am getting an error for the following code:
create table JOB_TBL(
JT_JOB_ID_FLD INT AUTO_INCREMENT,
JT_JOB_DESCRIPTION_FLD VARCHAR(4000),
JT_JOB_POSTER_FLD INT NOT NULL,
JT_JOB_POST_DATE_FLD DATE NOT NULL,
JT_JOB_CLOSE_DATE_FLD DATE NOT NULL,
PRIMARY KEY (JT_JOB_ID_FLD),
FOREIGN KEY (JT_JOB_POSTER_FLD)
REFERENCES USER_TBL(UT_USER_ID_FLD)
) ENGINE = INNODB;
At first I thought it had something to do with the NOT NULL on the two date fields, but it is still giving an error when I run the statement without those not nulls. Here is the error I receive:
#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 'FLD INT NOT NULL,
JT_JOB_POST_DATE_FLD DATE NOT NULL,
JT_JOB_CLOSE_DATE_FLD DA' at line 4
JT_JOB_POSTER_ FLD INT NOT NULL,
^----- what's this?
Mysql explicitly points you to the wrong place, next time just hold your breath and read it carefully.
There should not be a space between after the underscore in this line:
JT_JOB_POSTER_ FLD INT NOT NULL,
^^^
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
Where can i find the manual for for MySQL 5.0 syntax? What i would need is the manual that corresponds to my MySQL server version (MySQL 5.0)?
Considering this: I am using MySQL 5.0 and NaviCat for GUI. If i run this query:
CREATE TABLE `genres` (
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
`genre_name` VARCHAR( 25 ) NOT NULL
`description` VARCHAR( 100 ) NOT NULL
) ENGINE = innodb;
-> Navicat gives me a check your syntax error, and so does the sql prompt..
Where can i find info about SQL 5.0 syntax? I've tried the SQL site and Googled it but no luck. Maybe i am truly an idiot ;-)
http://dev.mysql.com/doc/refman/5.0/en/
More specifically, for the CREATE TABLE statement:
http://dev.mysql.com/doc/refman/5.0/en/create-table.html
How about http://dev.mysql.com/doc/refman/5.0/en/sql-syntax.html ?
There seem to be a missing coma (,) between 3rd and 4th lines in your query.
The official MySQL documentation is the best place. It has tutorials and references for everything
This should point you in the right direction: MySQL Statement Syntax
It looks like you're missing a comma at the end of this line (comma added):
`genre_name` VARCHAR( 25 ) NOT NULL,
You need a comma after every line except the last line of a create table statement.