king.
> but the problem is that if I define md5 as unique key and there exists
> 2 different urls with the same md5. I can't insert the second url
> anymore
>
> On Tue, Nov 5, 2013 at 11:55 PM, Dan Nelson wrote:
>> In the last episode (Nov 05), Li Li said:
>>&g
I prefer your solution in that it's something like Optimistic Locking.
> but the problem is that if I define md5 as unique key and there exists
> 2 different urls with the same md5. I can't insert the second url
> anymore
>
> On Tue, Nov 5, 2013 at 11:55 PM, Dan Nelson
&g
I prefer your solution in that it's something like Optimistic Locking.
but the problem is that if I define md5 as unique key and there exists
2 different urls with the same md5. I can't insert the second url
anymore
On Tue, Nov 5, 2013 at 11:55 PM, Dan Nelson wrote:
> In the last ep
.
> -Original Message-
> From: Dan Nelson [mailto:dnel...@allantgroup.com]
> Sent: Tuesday, November 05, 2013 7:56 AM
> To: Li Li
> Cc: mysql@lists.mysql.com
> Subject: Re: how to create unique key for long varchar?
>
> In the last episode (Nov 05), Li Li said:
> >
In the last episode (Nov 05), Li Li said:
> I want to create a table with a long varchar column, maybe it's the url.
> according to dns spec, the url's max length is fixed. but I have
> to deal with url having long params such as
> a.html?q=&fl=bb
hi all
I want to create a table with a long varchar column, maybe it's the url.
according to dns spec, the url's max length is fixed. but I have
to deal with url having long params such as
a.html?q=&fl=
I want the url is unique whe
who cares? If it's a
life sustaining mission critical problem where an atomic war starts if the
transaction fails ... you might want to at least think about another key.
Personally, I wouldn't lose sleep over it.
Another reasonable - and faster - source of a unique key would be to have a
>-Original Message-
>From: Michael Dykman [mailto:mdyk...@gmail.com]
>Sent: Friday, January 21, 2011 11:35 AM
>To: Johan De Meersman
>Cc: Anthony Pace; mysql.
>Subject: Re: best way to have a unique key
>
>One of the components of the UUID is drawn form the ma
rimary key
>>> that is not unique.
>>>
>>> - michael dykman
>>>
>>> On Thu, Jan 20, 2011 at 1:32 PM, Anthony Pace
>>> wrote:
>>>
>>>> Due to certain reasons, the company I am doing business with has decided
>>>&g
>-Original Message-
>From: vegiv...@gmail.com [mailto:vegiv...@gmail.com] On Behalf Of Johan De
>Meersman
>Sent: Friday, January 21, 2011 1:22 AM
>To: Anthony Pace
>Cc: Michael Dykman; mysql.
>Subject: Re: best way to have a unique key
>
>I have to say, som
or any other RDBMS will allow you to establish a primary key
>> that is not unique.
>>
>> - michael dykman
>>
>> On Thu, Jan 20, 2011 at 1:32 PM, Anthony Pace
>> wrote:
>>
>>> Due to certain reasons, the company I am doing business with has decide
http://www.mysqlperformanceblog.com/2007/03/13/to-uuid-or-not-to-uuid/
> -Original Message-
> From: Krishna Chandra Prajapati [mailto:prajapat...@gmail.com]
> Sent: Thursday, January 20, 2011 10:45 AM
> To: Anthony Pace
> Cc: mysql.
> Subject: Re: best way to have a un
;>>>
>>>> Due to certain reasons, the company I am doing business with has decided
>>>> that the primary key, for an orders table, be a unique key; however, I
>>>> don't
>>>> like the possibility of it conflicting if moved to another mach
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
What conflicts are you expecting? according to the documentation:
A UUID is designed as a number that is globally unique in space and
time. Two calls to UUID() are expected to generate two different
values, even if these calls are performed on two sep
Thu, Jan 20, 2011 at 1:32 PM, Anthony
Pace wrote:
Due to certain reasons, the company I am doing business with has
decided
that the primary key, for an orders table, be a unique key; however,
I don't
like the possibility of it conflicting if moved to another machine.
What are some pitfal
I know of uuid() my problem is that there can be conflicts when copying
the DB to a different machine, or working with sections of the db on
different machines for load balancing.
On 1/20/2011 1:44 PM, Krishna Chandra Prajapati wrote:
> Please keep in mind this variable will also be displayed
orders table, be a unique key; however, I don't
like the possibility of it conflicting if moved to another machine.
What are some pitfalls of using a unique key, that is generated by a server
side script, rather than by mysql?
What are the best ways to do this?
Please keep in mind this variable
uuid()
Krishna
On Fri, Jan 21, 2011 at 12:02 AM, Anthony Pace wrote:
> Due to certain reasons, the company I am doing business with has decided
> that the primary key, for an orders table, be a unique key; however, I don't
> like the possibility of it conflicting if moved to a
Due to certain reasons, the company I am doing business with has decided
that the primary key, for an orders table, be a unique key; however, I
don't like the possibility of it conflicting if moved to another machine.
What are some pitfalls of using a unique key, that is generated by a
s
RIMARY"
AND Seq_in_index = '2';
But this is an extra query - is there a way to know it from the first
query?
I also posted this question on Stack Overflow [ http://stackoverflow.com/questions/1486068/which-unique-key-is-hit-with-my-insert
], but I want to check whether this
On 07/30/2009 02:23 PM, Joerg Bruehe wrote:
Hi !
mos wrote:
At 09:13 AM 7/30/2009, b wrote:
Are UNIQUE KEY& UNIQUE INDEX two ways of specifying the same thing?
If not, what are the differences?
Feel free to tell me to RTFM but please post manual chapters. I've
been looking but hav
Hi !
mos wrote:
> At 09:13 AM 7/30/2009, b wrote:
>> Are UNIQUE KEY & UNIQUE INDEX two ways of specifying the same thing?
>> If not, what are the differences?
>>
>> Feel free to tell me to RTFM but please post manual chapters. I've
>> been looking but hav
At 09:13 AM 7/30/2009, b wrote:
Are UNIQUE KEY & UNIQUE INDEX two ways of specifying the same thing? If
not, what are the differences?
Feel free to tell me to RTFM but please post manual chapters. I've been
looking but haven't been able to find anything.
They are the same
Are UNIQUE KEY & UNIQUE INDEX two ways of specifying the same thing? If
not, what are the differences?
Feel free to tell me to RTFM but please post manual chapters. I've been
looking but haven't been able to find anything.
--
MySQL General Mailing List
For list
on here?
How can I get rid of this error?
Thx
ImRe
>
> Dan
>
>
> On 12/11/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I have an InnoDB table similar to this:
> >
> > CREATE TABLE Target
> > (IMSI VARCHAR(15) ASCII,
> I have an InnoDB table similar to this:
>
> CREATE TABLE Target
> (IMSI VARCHAR(15) ASCII,
> IMEI VARCHAR(15) ASCII,
> UNIQUE KEY (IMSI, IMEI));
>
> After playing a bit with it, I managed to add duplicate records, if one of
12/11/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Hi,
I have an InnoDB table similar to this:
CREATE TABLE Target
(IMSI VARCHAR(15) ASCII,
IMEI VARCHAR(15) ASCII,
UNIQUE KEY (IMSI, IMEI));
After playing a bit with it, I managed to add duplicate records, if one of
the fields was
It is expected behavior, you can make the unique key a primary key
instead. This should prevent this situation.
Ed
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, December 11, 2006 7:42 AM
To: mysql@lists.mysql.com
Subject: UNIQUE KEY vs NULLs
Hi,
I
Hi,
I have an InnoDB table similar to this:
CREATE TABLE Target
(IMSI VARCHAR(15) ASCII,
IMEI VARCHAR(15) ASCII,
UNIQUE KEY (IMSI, IMEI));
After playing a bit with it, I managed to add duplicate records, if one of
the fields was a NULL:
+-+-+
| IMSI
rake Linux LE 2005 environments.
>
> For the sake of ease, I will just set up a small test table to assist me
with
> this question.
>
> > Create table test (
> x smallint not null,
> y char(5) default null,
> z char(10) not null default '',
> Unique K
o assist me with
this question.
> Create table test (
x smallint not null,
y char(5) default null,
z char(10) not null default '',
Unique Key `s`(x, y)
) ENGINE=MyISAM
test> Insert into test values (1, 'dan', 'yes'), (2,
environments.
For the sake of ease, I will just set up a small test table to assist me with
this question.
> Create table test (
x smallint not null,
y char(5) default null,
z char(10) not null default '',
Unique Key `s`(x, y)
) ENGINE=MyISAM
test
My application contains a table `event` which is essentially a historical log.
Currently it contains a UNIQUE KEY on three fields - the location which
generated the event `location_id`, the timestamp the event was generated
`timestamp`, and the type of event `type`.
I have discovered that this
varchar(255) default NULL,
`pid` smallint(5) unsigned NOT NULL default '0',
UNIQUE KEY `uniq_phone_key` (`user_agent`,`http_x_wap_profile`,`pid`)
) TYPE=MyISAM;
How-To-Repeat:
server 1:
mysql> SELECT VERSION();
++
| VERSION() |
++
| 4.0.22-log |
+---
d` smallint(5) unsigned NOT NULL default '0',
UNIQUE KEY `uniq_phone_key` (`user_agent`,`http_x_wap_profile`,`pid`)
) TYPE=MyISAM;
>How-To-Repeat:
server 1:
mysql> SELECT VERSION();
++
| VERSION() |
++
| 4.0.22-log |
++
1 row in set (0
Eric Jensen <[EMAIL PROTECTED]> wrote on 07/20/2005 02:00:26 PM:
> I have a field that was set as a unique key when created via:
> UNIQUE KEY `username` (`username`)
>
> I no longer want it unique, but can't see a way with ALTER TABLE to
> remove it. It isn't th
www.mysql.com/doc
search drop index
Eric Jensen wrote:
I have a field that was set as a unique key when created via:
UNIQUE KEY `username` (`username`)
I no longer want it unique, but can't see a way with ALTER TABLE to
remove it. It isn't the Primary Key or an index. The desc
I have a field that was set as a unique key when created via:
UNIQUE KEY `username` (`username`)
I no longer want it unique, but can't see a way with ALTER TABLE to
remove it. It isn't the Primary Key or an index. The describe looks
In article <[EMAIL PROTECTED]>,
"Gustafson, Tim" <[EMAIL PROTECTED]> writes:
> Martijn,
> The problem is that I don't want more than one row in the table that has
> a null value in the column. As you've pointed out in your e-mail,
> there's a difference between NULL and BLANK. It's not that I do
Tim,
> The table in question is used to store aliases to web sites. That is,
> "meitech.com" is the main web site, and "www.meitech.com" is the alias.
> So, the first column is the domain name in question, and the second on
> is the host name part of the alias, in this example "www".
>
> Now, I a
> The problem is that I don't want more than one row in the table that has
> a null value in the column. As you've pointed out in your e-mail,
> there's a difference between NULL and BLANK. It's not that I don't want
> NULL values, it's that I don't want MORE THAN ONE.
I can easily continue arg
Gustafson, Tim; Paul DuBois; mysql@lists.mysql.com
Subject: Re: UNIQUE Key Allowing Duplicate NULL Values
Tim,
> Oh well, thanks anyhow.
>
> If I could put in a feature suggestion, it would be a flag that I
could
> set to disallow duplicate nulls. :)
What for?
NULL is not equal to N
Tim,
> Oh well, thanks anyhow.
>
> If I could put in a feature suggestion, it would be a flag that I could
> set to disallow duplicate nulls. :)
What for?
NULL is not equal to NULL. Period.
If you don't want NULLs, make the column "not null".
The specification is correct.
With regards,
Mart
/
-Original Message-
From: Paul DuBois [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 23, 2005 8:14 AM
To: Gustafson, Tim; mysql@lists.mysql.com
Subject: RE: UNIQUE Key Allowing Duplicate NULL Values
At 8:10 -0500 2/23/05, Gustafson, Tim wrote:
>Is there any flag I can set on
x27;d have to use a BDB table, because only BDB allows a single
NULL per UNIQUE index.
-Original Message-
From: Paul DuBois [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 22, 2005 3:13 PM
To: Gustafson, Tim; mysql@lists.mysql.com
Subject: Re: UNIQUE Key Allowing Duplicate NULL Values
At
:[EMAIL PROTECTED]
Sent: Tuesday, February 22, 2005 3:13 PM
To: Gustafson, Tim; mysql@lists.mysql.com
Subject: Re: UNIQUE Key Allowing Duplicate NULL Values
At 15:00 -0500 2/22/05, Gustafson, Tim wrote:
>Hi there!
>
>I have a table, defined as follows:
>
>CREATE TABLE `Web
x27;,
`Alias` char(16) default NULL,
PRIMARY KEY (`ID`),
UNIQUE KEY `DomainName` (`DomainName`,`Alias`),
) ENGINE=InnoDB DEFAULT CHARSET=latin1
The way I read this definition, it should be impossible for someone to
put in two rows with the same DomainName and Alias, however, right now I
have t
PRIMARY KEY (`ID`),
UNIQUE KEY `DomainName` (`DomainName`,`Alias`),
) ENGINE=InnoDB DEFAULT CHARSET=latin1
The way I read this definition, it should be impossible for someone to
put in two rows with the same DomainName and Alias, however, right now I
have the followi
put of EXPLAIN
statement and the definitions of your tables which are used by query.
Ginger Cheng <[EMAIL PROTECTED]> wrote:
> Hello, MySQL gurus,
> I have a non-unique key of 2 columns, the 1st is a varchar(15),
> 2nd is a int(10) unsigned. But when I 'explain&
Hello, MySQL gurus,
I have a non-unique key of 2 columns, the 1st is a varchar(15),
2nd is a int(10) unsigned. But when I 'explain' a query that uses this
key, the key_len is only 15 with the key name shown up in the 'key'
column of this table correctly though. Acc
Hello,
> RE:
> > And columns in primary keys must be NOT NULL. Columns in unique
> > keys can be NULL (if they are NOT NULL, then the unique key is
> > functionally the same as a primary key).
>
> OK, thanks guys for the explanation.
>
> Then the result o
> >> I have two tables, seemigly very similar setup; the primary key is the
> >> combination of two columns. With mysqldump, however, the table
> >> definition of the two tables looks different.
> >>
> >> Mysqldump on table 1 says
> >>
Hi,
RE:
> And columns in primary keys must be NOT NULL. Columns in unique
> keys can be NULL (if they are NOT NULL, then the unique key is
> functionally the same as a primary key).
OK, thanks guys for the explanation.
Then the result of mysqldump table definition part:
UNIQUE KE
At 22:27 +0100 12/28/04, Martijn Tonies wrote:
Hello,
I have two tables, seemigly very similar setup; the primary key is the
combination of two columns. With mysqldump, however, the table
definition of the two tables looks different.
Mysqldump on table 1 says
...
UNIQUE KEY HONstid
Hello,
> I have two tables, seemigly very similar setup; the primary key is the
> combination of two columns. With mysqldump, however, the table
> definition of the two tables looks different.
>
> Mysqldump on table 1 says
> ...
> UNIQUE KEY HONstid (HONstid,HONname)
Hi,
I have two tables, seemigly very similar setup; the primary key is the
combination of two columns. With mysqldump, however, the table
definition of the two tables looks different.
Mysqldump on table 1 says
...
UNIQUE KEY HONstid (HONstid,HONname)
whereas on table 2 it says
Hi all...
I am having a problem with unique key violations in one of my tables.
This is the table structure:
CREATE TABLE `optionaldata` (
`ForeignID` int(10) unsigned NOT NULL default '0',
`FieldID` int(10) unsigned NOT NULL default '0',
`Value` char(200) defaul
Thanks to all for helping me sort this out. I am setting the field to
tinyblob vs tinytext.
Thanks again.
God Bless
Paul C. McNeil
Developer in Java, MS-SQL, MySQL, and web technologies.
Microneil research
Sniffer Anti Spam
Sortmonster Research
GOD BLESS AMERICA!
To God Be The Gl
ry as -
Select * from myTable where DATA = 'june' - I am returned both.
If I query as
Select * from myTable where cast(DATA as binary) = 'june' - I am returned
only one.
How can I set this table so that the unique key is based on the binary value
of the field? Do I have to alter the
If I query as
Select * from myTable where cast(DATA as binary) = 'june' - I am returned
only one.
How can I set this table so that the unique key is based on the binary
value
of the field? Do I have to alter the field type or is there a better
way?
Thank you.
God Bless
Paul C. McN
On Thu, Sep 18, 2003 at 08:20:00AM -0700, Scot Campbell wrote:
> O.K., I understand. And I have always coded in this manner.
>
> Throw the data at the system and see if it sticks. In most cases it will.
>
> However, when it does fail, it would be nice to determine the error w/o
> issuing more
lated, issue
selects for each of the unique contrained columns to determine which one was
violated"?
Thanks
From: Jeremy Zawodny <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: Scot Campbell <[EMAIL PROTECTED]>
CC: [EMAIL PROTECTED]
Subject: Re: Unique Key Violation - How
On Wed, Sep 17, 2003 at 03:07:41PM -0700, Scot Campbell wrote:
> These will be random atomic Inserts originating from a Web page.
>
> I'm not sure I catch your drift. The inserts are not in a batch.
>
> I need to notify the user on the page which field was in error. I'd like to
> refer to the
ns the non-duplicate data (i.e., error message on the email address
vs. error message on the userid field).
From: Jeremy Zawodny <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: Scot Campbell <[EMAIL PROTECTED]>
CC: [EMAIL PROTECTED]
Subject: Re: Unique Key Violation - How to de
On Wed, Sep 17, 2003 at 08:01:07AM -0700, Scot Campbell wrote:
> Let me rephrase. I insert a row and recieve a 1062 error (Key violation).
> How do I determine, at run-time, which of the 3 possible columns has the
> error. I guess I could parse the mysql_error message string. But, that
> see
uniqueness via individual selects before I issue the insert.
Thanks
From: Jeremy Zawodny <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: Scot Campbell <[EMAIL PROTECTED]>
CC: [EMAIL PROTECTED]
Subject: Re: Unique Key Violation - How to determine which key
Date: Tue, 16 Sep 2003 20
can retrieve a message w/ mysql_error() which returns "Duplicate entry
> '[EMAIL PROTECTED]' for key 3"
>
> I'd rather get the name of the unique key, in this case I named it
> `IDX_EMAILADDR`.
>
> Any ideas? Thanks
Look at SHOW KEYS or SHOW CREATE TABLE a
for key 3"
I'd rather get the name of the unique key, in this case I named it
`IDX_EMAILADDR`.
Any ideas? Thanks
_
Send and receive larger attachments with Hotmail Extra Storage.
http://join.msn.com/?PAGE=features/es
; | id| int(11) | | | 0 | |
> | name | char(30) | YES | | NULL| |
> | tel | char(20) | | PRI | | |
> +---+--+--+-+-+---+
> 3 rows in set (0.00 sec)
>
> Unique key was dropped. Why not Primary key, why no error message???
Confirmed. Fixed in 4
Hi Victoria,
Victoria Reznichenko wrote:
"Nils Valentin" <[EMAIL PROTECTED]> wrote:
I have a problem understanding why MySQL is deleting a unique key instead of
a primary key.
from Documentation: DROP PRIMARY KEY drops the primary index. If no such index
exists, it drops
| int(11) | | | 0 | |
| name | char(30) | YES | | NULL| |
| tel | char(20) | | PRI | | |
+---+--+--+-+-+---+
3 rows in set (0.00 sec)
Unique key was dropped. Why not Primary key, why no error message???
"Nils Valentin" <[EMAIL PROTECTED]> wrote:
>
> I have a problem understanding why MySQL is deleting a unique key instead of
> a primary key.
>
> from Documentation: DROP PRIMARY KEY drops the primary index. If no such index
> exists, it drops the first UNIQU
"Nils Valentin" <[EMAIL PROTECTED]> wrote:
> Hi Victoria,
>
> Victoria Reznichenko wrote:
>
>>"Nils Valentin" <[EMAIL PROTECTED]> wrote:
>>
>>
>>>I have a problem understanding why MySQL is deleting a unique key instead o
t;
> +---+--+--+-+-+---+
>
> | id| int(11) | | | 0 | |
> | name | char(30) | YES | | NULL | |
> | tel | char(20) | | PRI | | |
>
> +---+--+--+-+-+---+
> 3
I have a problem understanding why MySQL is deleting a unique key
instead of a primary key.
from Documentation: DROP PRIMARY KEY drops the primary index. If no
such index exists, it drops the first UNIQUE index in the table.
When I do it then I get this:
mysql> desc uksamp
Hi Mysql fans ;-);
I have a problem understanding why MySQL is deleting a unique key instead of
a primary key.
from Documentation: DROP PRIMARY KEY drops the primary index. If no such index
exists, it drops the first UNIQUE index in the table.
When I do it then I get this:
mysql> d
fault NULL,\
`asset_duration` bigint(20) default NULL,\
`asset_status` varchar(10) default NULL,\
`asset_channel` varchar(20) default NULL,\
PRIMARY KEY (`ano`),\
UNIQUE KEY `asset_name_2` (`asset_name`),\
KEY `p_asset_name_idx01` (`asset_name`)\
) TYPE=InnoDB
According to the manual,there is no '
bigint(20) default NULL,\
`asset_status` varchar(10) default NULL,\
`asset_channel` varchar(20) default NULL,\
PRIMARY KEY (`ano`),\
UNIQUE KEY `asset_name_2` (`asset_name`),\
KEY `p_asset_name_idx01` (`asset_name`)\
) TYPE=InnoDB
According to the manual,there is no 'drop uniqu
. DESCRIBE TABLE does not contain all information.
Regards,
Heikki
- Original Message -
From: "Matt Solnit" <[EMAIL PROTECTED]>
To: "Heikki Tuuri" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Cc: "Henry Bequet" <[EMAIL PROTECTED]>
Sent: Saturda
mysql>CREATE TABLE mytable (a INT NOT NULL, b INT NOT NULL, c INT NOT
NULL, d INT NOT NULL, PRIMARY KEY (a), UNIQUE KEY (b, c));
mysql>DESCRIBE TABLE mytable;
--
Results:
--
+---+-+--+-+-+---+
| Field | Type| Null | Ke
YSQL_FIELD structure returned by mysql_fetch_field(), the
MULTIPLE_KEY_FLAG will only be present in the first column.
-
Test script:
-
mysql>USE test
mysql>CREATE TABLE mytable (a INT NOT NULL, b INT NOT NULL, c INT NOT
NULL, d INT NOT NULL, PRIMARY KEY (a), UNIQUE KE
jwakely,
Wednesday, September 18, 2002, 5:46:19 PM, you wrote:
jamdc> The output of DESCRIBE tbl_name shows unique keys to be "MUL" for columns
jamdc> defined as NULL.
jamdc> The SQL shown is a minimal test case that creates a new database and two
jamdc> tables, both wi
>Description:
The output of DESCRIBE tbl_name shows unique keys to be "MUL" for columns
defined as NULL.
The SQL shown is a minimal test case that creates a new database and two
tables, both with a unique key on the column "uni"
The first table is fine.
The second tabl
uot;Andy Sy" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
>>Sent: Friday, June 14, 2002 2:45 AM
>>Subject: Re: Why does Key==Mul in DESCRIBE TABLE for unique key?
>>
>>>At 2:03 +0800 6/14/02, Andy Sy wrote:
>
At 3:35 +0800 6/14/02, Andy Sy wrote:
>- Original Message -
>From: "Paul DuBois" <[EMAIL PROTECTED]>
>To: "Andy Sy" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
>Sent: Friday, June 14, 2002 2:45 AM
>Subject: Re: Why does Key==Mul in DESCRIB
lt;[EMAIL PROTECTED]>
>Sent: Friday, June 14, 2002 2:45 AM
>Subject: Re: Why does Key==Mul in DESCRIBE TABLE for unique key?
>
>
>>At 2:03 +0800 6/14/02, Andy Sy wrote:
>>
>>>mysql> CREATE TABLE X (FLD1 INT UNIQUE);
>>>Query OK, 0 rows affected (0.05 sec
- Original Message -
From: "Paul DuBois" <[EMAIL PROTECTED]>
To: "Andy Sy" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, June 14, 2002 2:45 AM
Subject: Re: Why does Key==Mul in DESCRIBE TABLE for unique key?
> At 2:03 +0800 6/14/02
At 2:03 +0800 6/14/02, Andy Sy wrote:
>mysql> CREATE TABLE X (FLD1 INT UNIQUE);
>Query OK, 0 rows affected (0.05 sec)
>
>mysql> DESCRIBE X;
>+---+-+--+-+-+---+
>| Field | Type| Null | Key | Default | Extra |
>+---+-+--+-+-+---+
>|
mysql> CREATE TABLE X (FLD1 INT UNIQUE);
Query OK, 0 rows affected (0.05 sec)
mysql> DESCRIBE X;
+---+-+--+-+-+---+
| Field | Type| Null | Key | Default | Extra |
+---+-+--+-+-+---+
| FLD1 | int(11) | YES | MUL | NULL|
escription:
first thing i am not sure, if this is a bug or I am missunderstanding
something.
It is possible to insert multiple records in a database, having the same
unique key,
if the unique key or one of its fields contain NULL.
I know that NULL compares to itself as not equal, but I dont know
How do I drop a Unique key from a table in my database?
I know I should Alter table, however there doesn't seems to have an option
to drop just the Unique key but not the primary key. Change and modify does
seems to do it either..
Jaso
se an index for the time
being?
gl
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 09, 2001 6:43 PM
Subject: BUG: Cannot DELETE all records with NULL entries in UNIQUE KEY
fields
> >Description:
>
> Attempting to
Hi!
>>>>> "loschert" == loschert <[EMAIL PROTECTED]> writes:
>> Description:
loschert> Attempting to delete all records in a table containing NULL values in a
loschert> UNIQUE KEY field does not work as expected. Only a single record is deleted,
los
Hello.
On Mon, Apr 09, 2001 at 01:05:01PM -0400, [EMAIL PROTECTED] wrote:
> On 9 Apr 2001 [EMAIL PROTECTED] wrote:
>
> > >Description:
> >
> > Attempting to delete all records in a table containing NULL values in a
> > UNIQUE KEY field does not work as e
[EMAIL PROTECTED] writes:
> >Description:
>
> Attempting to delete all records in a table containing NULL values in a
> UNIQUE KEY field does not work as expected. Only a single record is deleted,
> presumably because the server thinks that the table will only have on
>Description:
Attempting to delete all records in a table containing NULL values in a
UNIQUE KEY field does not work as expected. Only a single record is deleted,
presumably because the server thinks that the table will only have one record
with a NULL value in it (as it is in a UNIQUE fi
96 matches
Mail list logo