Bluehost.com Web Hosting $6.95

dropping uniqueness of a field

This is a discussion on dropping uniqueness of a field within the MySQL Database forums, part of the Database Forums category; I have a unique constraint on a field that is neither a primary key nor an index field. How do ...


Go Back   Usenet Forums > Database Forums > MySQL Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-05-2007
john7
 
Posts: n/a
Default dropping uniqueness of a field

I have a unique constraint on a field that is neither a primary key
nor an index field.
How do I remove the unique constraint without deleting the field?

Thanks
John

Reply With Quote
  #2 (permalink)  
Old 03-05-2007
Rik
 
Posts: n/a
Default Re: dropping uniqueness of a field

john7 <johnmark@fastermail.com> wrote:

> I have a unique constraint on a field that is neither a primary key
> nor an index field.
> How do I remove the unique constraint without deleting the field?


ALTER TABLE table_name DROP KEY key_name;
--
Rik Wasmus
Posted on Usenet: any site claiming this as original content or me as an
contributing member is stealing content.
Ask Smart Questions: http://tinyurl.com/anel
Reply With Quote
  #3 (permalink)  
Old 03-05-2007
john7
 
Posts: n/a
Default Re: dropping uniqueness of a field

On Mar 5, 11:14 am, Rik <luiheidsgoe...@hotmail.com> wrote:
> john7 <johnm...@fastermail.com> wrote:
> > I have a unique constraint on a field that is neither a primary key
> > nor an index field.
> > How do I remove the unique constraint without deleting the field?

>
> ALTER TABLE table_name DROP KEY key_name;
> --
> Rik Wasmus
> Posted on Usenet: any site claiming this as original content or me as an
> contributing member is stealing content.
> Ask Smart Questions:http://tinyurl.com/anel


Hi Rik,
Thanks gain for answering my questions.
I just wanted to let you know that I am using MySQL 3.3. I tested it
and it did not work. I did see a comment from someone in MySQL site
that it is has been tested for version 5.0.11 to 5.0.15.

Thanks
John

Reply With Quote
  #4 (permalink)  
Old 03-05-2007
Martijn Tonies
 
Posts: n/a
Default Re: dropping uniqueness of a field


> I just wanted to let you know that I am using MySQL 3.3. I tested it
> and it did not work.


What was the error message? Please be as specific as possible
when asking questions.

You started out with:
- no MySQL version
- no record of what you've tried
- no metadata as extracted by the mysql tools

Do you think we can guess what your system looks like? :)


--
Martijn Tonies
Database Workbench - development tool for MySQL, and more!
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com


Reply With Quote
  #5 (permalink)  
Old 03-05-2007
Paul Lautman
 
Posts: n/a
Default Re: dropping uniqueness of a field

Martijn Tonies wrote:
>> I just wanted to let you know that I am using MySQL 3.3. I tested it
>> and it did not work.

>
> What was the error message? Please be as specific as possible
> when asking questions.
>
> You started out with:
> - no MySQL version
> - no record of what you've tried
> - no metadata as extracted by the mysql tools
>
> Do you think we can guess what your system looks like? :)


Ys, it astonishes me the amount of people who think "it does not work" is a
good description of a problem!


Reply With Quote
  #6 (permalink)  
Old 03-06-2007
john7
 
Posts: n/a
Default Re: dropping uniqueness of a field

On Mar 5, 3:04 pm, "Paul Lautman" <paul.laut...@btinternet.com> wrote:
> Martijn Tonies wrote:
> >> I just wanted to let you know that I am using MySQL 3.3. I tested it
> >> and it did not work.

>
> > What was the error message? Please be as specific as possible
> > when asking questions.

>
> > You started out with:
> > - no MySQL version
> > - no record of what you've tried
> > - no metadata as extracted by the mysql tools

>
> > Do you think we can guess what your system looks like? :)

>
> Ys, it astonishes me the amount of people who think "it does not work" is a
> good description of a problem!


I don't think you know the answer to the question. Why would an error
message help? The question is, is it implemented in MySQL 3.3?

Reply With Quote
  #7 (permalink)  
Old 03-06-2007
john7
 
Posts: n/a
Default Re: dropping uniqueness of a field

I forgot to put the version in the first post, but I did said the
version is 3.3 later and I said I am trying to drop uniqueness
constraint from a field. There is nothing complicated here that would
need examples and error messages. The question is can uniqueness
constraint be removed from a field in MySQL 3.3?

On Mar 5, 2:58 pm, "Martijn Tonies" <m.ton...@upscene.removethis.com>
wrote:
> > I just wanted to let you know that I am using MySQL 3.3. I tested it
> > and it did not work.

>
> What was the error message? Please be as specific as possible
> when asking questions.
>
> You started out with:
> - no MySQL version
> - no record of what you've tried
> - no metadata as extracted by the mysql tools
>
> Do you think we can guess what your system looks like? :)
>
> --
> Martijn Tonies
> Database Workbench - development tool for MySQL, and more!
> Upscene Productionshttp://www.upscene.com
> My thoughts:http://blog.upscene.com/martijn/
> Database development questions? Check the forum!http://www.databasedevelopmentforum.com



Reply With Quote
  #8 (permalink)  
Old 03-06-2007
Jerry Stuckle
 
Posts: n/a
Default Re: dropping uniqueness of a field

john7 wrote:
> On Mar 5, 3:04 pm, "Paul Lautman" <paul.laut...@btinternet.com> wrote:
>> Martijn Tonies wrote:
>>>> I just wanted to let you know that I am using MySQL 3.3. I tested it
>>>> and it did not work.
>>> What was the error message? Please be as specific as possible
>>> when asking questions.
>>> You started out with:
>>> - no MySQL version
>>> - no record of what you've tried
>>> - no metadata as extracted by the mysql tools
>>> Do you think we can guess what your system looks like? :)

>> Ys, it astonishes me the amount of people who think "it does not work" is a
>> good description of a problem!

>
> I don't think you know the answer to the question. Why would an error
> message help? The question is, is it implemented in MySQL 3.3?
>


An error message helps because it tells us exactly what MySQL is
complaining about. "It doesn't work" is not a real description of the
problem.

So yes - an error message helps. If they weren't important, why would
MySQL go to the trouble of implementing them? They could just return
"it doesn't work" for any error.

And I think you're an asshole.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Reply With Quote
  #9 (permalink)  
Old 03-06-2007
john7
 
Posts: n/a
Default Re: dropping uniqueness of a field

On Mar 5, 7:14 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> john7 wrote:
> > On Mar 5, 3:04 pm, "Paul Lautman" <paul.laut...@btinternet.com> wrote:
> >> Martijn Tonies wrote:
> >>>> I just wanted to let you know that I am using MySQL 3.3. I tested it
> >>>> and it did not work.
> >>> What was the error message? Please be as specific as possible
> >>> when asking questions.
> >>> You started out with:
> >>> - no MySQL version
> >>> - no record of what you've tried
> >>> - no metadata as extracted by the mysql tools
> >>> Do you think we can guess what your system looks like? :)
> >> Ys, it astonishes me the amount of people who think "it does not work" is a
> >> good description of a problem!

>
> > I don't think you know the answer to the question. Why would an error
> > message help? The question is, is it implemented in MySQL 3.3?

>
> An error message helps because it tells us exactly what MySQL is
> complaining about. "It doesn't work" is not a real description of the
> problem.
>
> So yes - an error message helps. If they weren't important, why would
> MySQL go to the trouble of implementing them? They could just return
> "it doesn't work" for any error.
>
> And I think you're an asshole.
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck...@attglobal.net
> ==================- Hide quoted text -
>
> - Show quoted text -


An error message helps in certain cases but not when you only want to
know if a feature is implemented in a certain version


Reply With Quote
  #10 (permalink)  
Old 03-06-2007
Jerry Stuckle
 
Posts: n/a
Default Re: dropping uniqueness of a field

john7 wrote:
> On Mar 5, 7:14 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
>> john7 wrote:
>>> On Mar 5, 3:04 pm, "Paul Lautman" <paul.laut...@btinternet.com> wrote:
>>>> Martijn Tonies wrote:
>>>>>> I just wanted to let you know that I am using MySQL 3.3. I tested it
>>>>>> and it did not work.
>>>>> What was the error message? Please be as specific as possible
>>>>> when asking questions.
>>>>> You started out with:
>>>>> - no MySQL version
>>>>> - no record of what you've tried
>>>>> - no metadata as extracted by the mysql tools
>>>>> Do you think we can guess what your system looks like? :)
>>>> Ys, it astonishes me the amount of people who think "it does not work" is a
>>>> good description of a problem!
>>> I don't think you know the answer to the question. Why would an error
>>> message help? The question is, is it implemented in MySQL 3.3?

>> An error message helps because it tells us exactly what MySQL is
>> complaining about. "It doesn't work" is not a real description of the
>> problem.
>>
>> So yes - an error message helps. If they weren't important, why would
>> MySQL go to the trouble of implementing them? They could just return
>> "it doesn't work" for any error.
>>
>> And I think you're an asshole.
>>
>> --
>> ==================
>> Remove the "x" from my email address
>> Jerry Stuckle
>> JDS Computer Training Corp.
>> jstuck...@attglobal.net
>> ==================- Hide quoted text -
>>
>> - Show quoted text -

>
> An error message helps in certain cases but not when you only want to
> know if a feature is implemented in a certain version
>
>


If you want to know if a certain feature is implemented in a certain
version, check the doc at www.mysql.com. It's all in there.

If you want help with a problem, ask here. And give the error message.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 05:21 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0