473,379 Members | 1,260 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Cannot create table in MySQL due error in SQL query..

13
Hi friends,
i am a newbie to mysql. i am using mysql 5.0 and db designer 4. I have created a schema in DB designer and i connected to mysql 5.0 server.
When i tried to exceute the sql script in order to create table i got the following error.
" 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 'NOT NULL AUTO_INCREMENT,
field_name1 VARCHAR NOT NULL,filed_name2 TEXT NULL,
pa' at line 1. "


The sql query which i tried to execute is shown below.

CREATE TABLE xxx (xxx VARCHAR NOT NULL AUTO_INCREMENT,
xxx VARCHAR NOT NULL,xxx TEXT NULL,
xxx VARCHAR NULL,xxx BLOB NULL,PRIMARY KEY(xxx, xxx),
INDEX xxx(xxx)
);


what is the syntax mysql 5.0 supports?what would be the problem.?
friends, please help me on this...
Thanks.
Feb 18 '07 #1
1 1860
ronverdonk
4,258 Expert 4TB
How do you suggest to increment a varchar field?
Auto_increment fields must be of data type INTEGER.

Ronald :cool:
Feb 18 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Michael J. Astrauskas | last post by:
I have a site where a user logs in and a session variable I created is used to keep track of the fact that the user is logged in. This various pages query a MySQL database to get information...
5
by: lkrubner | last post by:
I have a webserver through Rackspace. I create a domain. I create an FTP user. I upload some files. I create a database called testOfSetupScript and then I create a database user named setup. I...
0
by: Ola Ogunneye | last post by:
--=_075912CF.F899D547 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Hello again all, I have created an account in the particular database that I was trying to...
8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
2
by: Galina | last post by:
Hello I need to get data from 4 Oracle tables and combine them into a temporary table in my application. I get data using a pass-through query dynamically created in code: mySQL = "SELECT...
0
by: james.peer | last post by:
I'm fairly new to this so hopefully it is a dumb mistake... I need to create a simple stored procedure along the lines of: delimiter // CREATE DEFINER='root'@'localhost' PROCEDURE Insertuser()...
3
by: FNA access | last post by:
Hello all, I am relitivley new to mySQL. I started by downloading from the mySQL site. I then downloaded mySQL administrator and mySQL Query browser. With my set up I got a user root with a...
3
by: Hazza | last post by:
Hi, I am using PHP and mysql to create a website. I am fairly new to PHP, and thus am grateful to anyone who helps! Firstly I am running a homepage, that displays additional content if a user...
11
by: craigtomo | last post by:
i have changed my login .php file to the following this file is opened directly and is not called from any other file <?php // dBase file $host=""; // Host name $username=""; // Mysql...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.