Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 09-20-2003, 01:45 PM   #1
Registered: Feb 2003
Distribution: Slackware 9.0
Posts: 82

Rep: Reputation: 15
how can you add value 0 into mysql?

developers_id int(5) NOT NULL auto_increment,

Adding (0) will not work, it gets the next number in the auto_increment, but I need to add the row where developers_id = 0, how can I do this
Old 09-20-2003, 03:30 PM   #2
Registered: Apr 2002
Location: Los Gatos, CA
Distribution: boring redhat 9
Posts: 163

Rep: Reputation: 30
kinda crude, and this won't work easily if there's already data in it, but create the table as "developers_id int(5) NOT NULL"
then add your developers_id == 0 with an insert, then run
"alter table deve MODIFY developers_id int(5) primary key auto_increment;"

It worked on my test machine, but again, if there's data there already it might not be the cleanest solution.
Old 09-21-2003, 12:14 PM   #3
Registered: Feb 2003
Distribution: Slackware 9.0
Posts: 82

Original Poster
Rep: Reputation: 15
What I did was add it, then just set it to 0 :/


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL ODBC driver fails when trying to add a DSN to MySQL banjoman Linux - Software 0 01-24-2005 09:59 AM
MySQL add user tommytomato Linux - Newbie 1 02-19-2004 10:24 AM
Cant add MySQL through add/remove programs Hero Doug Fedora 6 01-03-2004 10:35 PM
can't add users to mysql niehls Linux - Software 2 02-21-2003 05:33 AM
How do I add Mysql as a service in RH8? rosko Linux - General 9 12-07-2002 11:20 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:28 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration