niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Databases » MySQL
"CHARACTER SET COLLATE NULL" error with mySQL 4.0.27
Post new topic   Reply to topic Page 1 of 1 [2 Posts] View previous topic :: View next topic
Author Message
thomas Armstrong
*nix forums beginner


Joined: 16 Sep 2005
Posts: 15

PostPosted: Thu Jul 20, 2006 9:11 am    Post subject: "CHARACTER SET COLLATE NULL" error with mySQL 4.0.27 Reply with quote

Hola.

With mySQL 4.0.27 I'm trying to create this table
------
CREATE TABLE `test`.`user` (

`user_id` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
`email` TEXT CHARACTER SET COLLATE NULL ,
`firstname` TEXT CHARACTER SET COLLATE NOT NULL ,
)
----------

but I get this 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 'CHARACTER SET COLLATE NULL,
`firstname` TEXT CHARACTER SET
------

Does anybody know which the right way is for this mySQL version? I'm using
mySQL-Workbench to design the tables, and that's the code I get?

Thank you very much.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql@m.gmane.org
Back to top
Visolve DB Team
*nix forums beginner


Joined: 21 Jul 2006
Posts: 3

PostPosted: Fri Jul 21, 2006 4:02 am    Post subject: Re: "CHARACTER SET COLLATE NULL" error with mySQL 4.0.27 Reply with quote

Hello Thomas

You have an error in your SQL syntax.

Please try this :

CREATE TABLE test.user
( user_id INT UNSIGNED NOT NULL AUTO_INCREMENT, PRIMARY KEY(user_id),
email text CHARACTER SET 'latin1' COLLATE 'latin1_swedish_ci',
firstname text CHARACTER SET 'latin1' COLLATE 'latin1_swedish_ci');

The error is due to the AUTO_INCREMENT column, which is not defined as
PRIMARY KEY and the CHARACTER SET column, which is not syntatically
defined.

Also to list the MySQL support Character Set try:
Show Character Set;


Thanks
ViSolve MySQL Support Team.

----- Original Message -----
From: "thomas Armstrong" <tarmstrong@gmail.com>
To: <mysql@lists.mysql.com>
Sent: Thursday, July 20, 2006 2:41 PM
Subject: "CHARACTER SET COLLATE NULL" error with mySQL 4.0.27


Quote:
Hola.

With mySQL 4.0.27 I'm trying to create this table
------
CREATE TABLE `test`.`user` (

`user_id` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
`email` TEXT CHARACTER SET COLLATE NULL ,
`firstname` TEXT CHARACTER SET COLLATE NOT NULL ,
)
----------

but I get this 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 'CHARACTER SET COLLATE NULL,
`firstname` TEXT CHARACTER SET
------

Does anybody know which the right way is for this mySQL version? I'm using
mySQL-Workbench to design the tables, and that's the code I get?

Thank you very much.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/mysql?unsub=mysql_support@visolve.com




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql@m.gmane.org
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [2 Posts] View previous topic :: View next topic
The time now is Sun Nov 23, 2008 1:59 pm | All times are GMT
navigation Forum index » Databases » MySQL
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts postfix smtp authentication using mysql stored user/pass rtresidd Postfix 0 Fri Oct 03, 2008 5:58 am
No new posts Postfix + MySQL error: very strange variable %s iWarior Postfix 0 Mon Aug 25, 2008 2:01 pm
No new posts ** Postfix error on console every minute or so ** ?? drywash Postfix 0 Fri Jul 04, 2008 8:49 pm
No new posts Postfix error bounce diwash Postfix 0 Fri Mar 28, 2008 3:37 am
No new posts I am getting following error in Aix 5.3 rockcharles1 AIX 0 Tue Aug 28, 2007 11:06 pm

Home Loan | Remortgages | Mobile Phones | Loans | Cadillac
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1863s ][ Queries: 16 (0.1111s) ][ GZIP on - Debug on ]