Why unsigned doesn't work?

2002-12-29 Thread Octavian Rasnita
Hi all,

I've tried the following SQL line in MySQL 4.05 for Windows and it told me
that there is an error starting from unsigned

mysql create table aaa(id int not null unsigned, name text);

Can you tell me why doesn't it work?

Thank you.

Teddy,
Teddy's Center: http://teddy.fcc.ro/
Email: [EMAIL PROTECTED]



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: Why unsigned doesn't work?

2002-12-29 Thread Cal Evans
try:
create table aaa(id int(5) unsigned not null, name text);

not sure why but unsigned needs to come before not null.

=C=

*
* Cal Evans
* The Virtual CIO
* http://www.calevans.com
*
 

-Original Message-
From: Octavian Rasnita [mailto:[EMAIL PROTECTED]]
Sent: Sunday, December 29, 2002 8:07 AM
To: [EMAIL PROTECTED]
Subject: Why unsigned doesn't work?


Hi all,

I've tried the following SQL line in MySQL 4.05 for Windows and it told me
that there is an error starting from unsigned

mysql create table aaa(id int not null unsigned, name text);

Can you tell me why doesn't it work?

Thank you.

Teddy,
Teddy's Center: http://teddy.fcc.ro/
Email: [EMAIL PROTECTED]



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Why unsigned doesn't work?

2002-12-29 Thread Ryan Fox

- Original Message -
From: Octavian Rasnita [EMAIL PROTECTED]

 mysql create table aaa(id int not null unsigned, name text);
 Can you tell me why doesn't it work?

You want:
create table aaa(id int unsigned not null, name text);

Your way doesn't work as 'unsigned' is a modification of the type, and so
needs to be next to the type declaration 'int'.

sql, query, anti-spam splooge.


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Why unsigned doesn't work?

2002-12-29 Thread Rick Pasotto
On Sun, Dec 29, 2002 at 04:06:39PM +0200, Octavian Rasnita wrote:
 Hi all,
 
 I've tried the following SQL line in MySQL 4.05 for Windows and it told me
 that there is an error starting from unsigned
 
 mysql create table aaa(id int not null unsigned, name text);
 
 Can you tell me why doesn't it work?

What is an 'unsigned not null'?

The syntax calls for (col_name type [NOT NULL] ...).

Two of the valid types are 'int' and 'int unsigned'.

Try 'create table aaa(id int unsigned not null, name text);'

-- 
All government is, in its essence, organized exploitation, and
in virtually all of its existing forms it is the implacable enemy
of every industrious and well-disposed man. --- H. L. Mencken
Rick Pasotto[EMAIL PROTECTED]http://www.niof.net

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Why unsigned doesn't work?

2002-12-29 Thread Joseph Bueno
Octavian Rasnita wrote:
 Hi all,
 
 I've tried the following SQL line in MySQL 4.05 for Windows and it told me
 that there is an error starting from unsigned
 
 mysql create table aaa(id int not null unsigned, name text);
 
 Can you tell me why doesn't it work?
 

Sure ! Your syntax is wrong. It should be:
create table aaa(id int unsigned not null, name text);

Please see the manual for more details:
http://www.mysql.com/doc/en/CREATE_TABLE.html

 Thank you.
 
 Teddy,
 Teddy's Center: http://teddy.fcc.ro/
 Email: [EMAIL PROTECTED]
 
Regards,
Joseph Bueno


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Why unsigned doesn't work?

2002-12-29 Thread Georg Richter
On Sunday 29 December 2002 15:06, Octavian Rasnita wrote:


 mysql create table aaa(id int not null unsigned, name text);

 Can you tell me why doesn't it work?


null can't be signed or unsigned.
try int unsigned not null

Regards

Georg


filter: mysql, query

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php