Re: Primary Key question

2005-07-01 Thread Haisam K. Ido
0400 From: "Haisam K. Ido" <[EMAIL PROTECTED]> To: mysql@lists.mysql.com Subject: Primary Key question I've created the following table (server 4.1 in win2k) CREATE TABLE `os` ( `id` tinyint(10) NOT NULL auto_increment, `name` varchar(255) NOT NULL default '',

Re: Primary Key question

2005-07-01 Thread Alec . Cawley
"Haisam K. Ido" <[EMAIL PROTECTED]> wrote on 01/07/2005 15:04:01: > > I've created the following table (server 4.1 in win2k) > > CREATE TABLE `os` ( >`id` tinyint(10) NOT NULL auto_increment, >`name` varchar(255) NOT NULL default '', >`description` varchar(255) default NULL, >PRI

Primary Key question

2005-07-01 Thread Haisam K. Ido
I've created the following table (server 4.1 in win2k) CREATE TABLE `os` ( `id` tinyint(10) NOT NULL auto_increment, `name` varchar(255) NOT NULL default '', `description` varchar(255) default NULL, PRIMARY KEY (`id`,`name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; and was very surprised

Re: Primary Key Question

2005-06-16 Thread Peter Brawley
Hendro, In SQL an empty string is not null. PB Hendro Suryawan wrote: Hi all, I have table with primary key on field PO,BrgId, NOSP but when i try insert several new reccord with field NOSP = '', mysql will accept the new reccord without complaint error. Is this normal behavior? My perception

Re: Primary Key Question

2005-06-16 Thread SGreen
Hendro Suryawan <[EMAIL PROTECTED]> wrote on 06/16/2005 06:53:31 PM: > Hi all, > I have table with primary key on field PO,BrgId, NOSP but when i try > insert several new reccord with field NOSP = '', mysql will accept the > new reccord without complaint error. > Is this normal behavior? As long

Primary Key Question

2005-06-16 Thread Hendro Suryawan
Hi all, I have table with primary key on field PO,BrgId, NOSP but when i try insert several new reccord with field NOSP = '', mysql will accept the new reccord without complaint error. Is this normal behavior? My perception if i have primary key on the three field the three field must be not empty

RE: Compound Primary Key question

2004-04-24 Thread Matt Chatterley
olumn as a PK. Cheers, Matt > -Original Message- > From: Jeremy Zawodny [mailto:[EMAIL PROTECTED] > Sent: 23 April 2004 23:51 > To: Emmett Bishop > Cc: [EMAIL PROTECTED] > Subject: Re: Compound Primary Key question > > On Fri, Apr 23, 2004 at 03:40:43PM -0700, E

Re: Compound Primary Key question

2004-04-23 Thread Jeremy Zawodny
On Fri, Apr 23, 2004 at 03:40:43PM -0700, Emmett Bishop wrote: > Quick question. In general, is it better to create > compound primary keys or use an auto increment field > to uniquely identify each record? Yes. It depends on your application and your data. Jeremy -- Jeremy D. Zawodny | Pe

Compound Primary Key question

2004-04-23 Thread Emmett Bishop
Quick question. In general, is it better to create compound primary keys or use an auto increment field to uniquely identify each record? --T __ Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25ยข http://photos.yahoo.c

Re: Primary key question

2002-12-17 Thread Steve Yates
On Tue, 17 Dec 2002 19:15:08 +0100, Serrand Patrice wrote: >Does MySQL automatically create index on primary key ? Yes. See http://www.mysql.com/doc/en/CREATE_TABLE.html - Steve Yates - Antonym: The opposite of the word you're searching for. ~ Taglines by Taglinator - www.srtware.com ~ ---

Primary key question

2002-12-17 Thread Serrand Patrice
Hi, Does MySQL automatically create index on primary key ? If not how can I create an index on a primary key ? Thanks for any help. Patrice Serrand - Before posting, please check: http://www.mysql.com/manual.php (the manu

re: Primary Key Question

2002-12-16 Thread Victoria Reznichenko
On Monday 16 December 2002 18:12, tmb wrote: > I understood that MySQL didn't internally keep up with > the relationships between tables... like MS Access... > > And that it was up to the programmer to referential > integrity... > > But I noticed in phpMyAdmin that the offer the option > of definin

Primary Key Question

2002-12-16 Thread tmb
I understood that MySQL didn't internally keep up with the relationships between tables... like MS Access... And that it was up to the programmer to referential integrity... But I noticed in phpMyAdmin that the offer the option of defining a column in a table as 'Primary' Am I confused on this

RE: mysql primary key question!

2002-07-09 Thread Erick Papadakis
uld be great if you'd post it > to > the mysql list. > > Carl McNamee > Systems Administrator > Billing Concepts > (210) 949-7282 > > -----Original Message- > From: Erick Papadakis [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 08, 2002 6:30 AM > To:

Re: mysql primary key question!

2002-07-08 Thread Roger Baklund
* Erick Papadakis > i need to set up an auto_increment field inside mysql. for various > reasons, the maximum size is 3. Could you say something about these reasons...? > but i don't want this to be ONLY integers > because that limits me until 999 numbers only. Well... using three _bytes_, the

Re: mysql primary key question!

2002-07-08 Thread cristian ditoiu
n . - Original Message - From: "Erick Papadakis" <[EMAIL PROTECTED]> To: "mysql" <[EMAIL PROTECTED]> Sent: Monday, July 08, 2002 2:30 PM Subject: mysql primary key question! > hello, > > i hope some database guru can help me with this! > >

Re: mysql primary key question!

2002-07-08 Thread Gelu Gogancea
t e-mail address : [EMAIL PROTECTED] [EMAIL PROTECTED] - Original Message - From: "Erick Papadakis" <[EMAIL PROTECTED]> To: "mysql" <[EMAIL PROTECTED]> Sent: Monday, July 08, 2002 2:30 PM Subject: mysql primary key question! > hello, > &

mysql primary key question!

2002-07-08 Thread Erick Papadakis
hello, i hope some database guru can help me with this! i need to set up an auto_increment field inside mysql. for various reasons, the maximum size is 3. but i don't want this to be ONLY integers because that limits me until 999 numbers only. since i have all flexibility for these three digi

Re: SQL PRIMARY KEY question

2001-02-17 Thread Fred van Engen
On Sat, Feb 17, 2001 at 12:07:53PM +0100, Cedric Lefebvre wrote: > I have written the following SQL request, but I get > an error, why ? > > create table MovementOrder ( > teamCode INT(4) NOT NULL, > quarter INT(4) NOT NULL, > position INT(4) NOT NULL, > priority INT(4) NOT NULL, > orde

Re: SQL PRIMARY KEY question

2001-02-17 Thread Artem Koutchine
- From: "Cedric Lefebvre" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, February 17, 2001 2:07 PM Subject: SQL PRIMARY KEY question > I have written the following SQL request, but I get > an error, why ? > > create table MovementOrder ( > t

SQL PRIMARY KEY question

2001-02-17 Thread Cedric Lefebvre
I have written the following SQL request, but I get an error, why ? create table MovementOrder ( teamCode INT(4) NOT NULL, quarter INT(4) NOT NULL, position INT(4) NOT NULL, priority INT(4) NOT NULL, order VARCHAR(10), parameter VARCHAR(5), PRIMARY KEY(teamCode,quarter,position,prio