473,385 Members | 1,597 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Need Help with mySQL ALTER TABLE

I want to create a table..Pls see the code below..but I would like to set the Username to unique or or primary key..scince I set AuthID to primary key already I can not make the Username to become primary key..Please help me out with this issue?
Thanks musch..

CREATE TABLE tblAuthenticates(
AuthID int(6) not null auto_increment,
Username varchar(32) not null,
Password varchar(128) not null,
Status tinyint not null,
AtypeID int(6),
FOREIGN KEY (ATypeID) REFERENCES tblAuthType(AtypeID),
PRIMARY KEY (Username)
PRIMARY KEY (AuthID));
Mar 24 '07 #1
2 1217
cnplnsk
19
You may use alter table using command
ALTER TABLE
you can find help about this command on google search
Mar 24 '07 #2
ronverdonk
4,258 Expert 4TB
You may use alter table using command
ALTER TABLE
you can find help about this command on google search
Do not google when you can find the answer in the standard public MySQL documentation itself!

Look at Alter Table Syntax for your information.

Ronald :cool:
Mar 25 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: sinasalek | last post by:
i have a problem with MySQL 4.1.x and UTF8. in version 4.0, i'm using html forms with utf8 charset for inserting unicode strings. but in version 4.1.x it is not working! if i change the charset of...
4
by: Ka | last post by:
I install a mysql server in default installation with latin charset, but I want to use GBK(a chinese charset), so that I can store and search chinese words directly. so, I download, unpack and...
0
by: Pierre-Luc Soucy | last post by:
Hi, I was working on some merge tables this morning and it worked fine, but after a few unsuccessful table creation requests (I was making some tests), I could not alter or select from a table...
0
by: Juan Cabanela | last post by:
I am a relatively new user to MySQL running version 4.0.17 on MacOS X 10.3.3 (this is the "current version" installed by the Fink package manager). I login to mysql as root mysql -u root -p ...
9
by: mfyahya | last post by:
Hi, I'm new to databases :) I need help speeding up select queries on my data which are currently taking 4-5 seconds. I set up a single large table of coordinates data with an index on the fields...
6
by: Dave | last post by:
Ok I have an interesting problem. I have written a database in Access to connect to our web shop and update prices etc from a supplier feed. It works almost perfectly! The prices are doubles, I...
11
by: Mark Cubitt | last post by:
the reason I ask is I have always used postgres at home and work, but my new web host only has mysql :( I want to know what sort of differences I will have in regards to programming php/perl...
48
by: phillip.s.powell | last post by:
MySQL 3.23.58 - 4.0.17 (yep, several database server instances, don't ask) I have database Spring with table Students I have database Summer with table Students I am tasked to produce a...
0
by: Bucker | last post by:
Could someone view the following that I copied from phpMyAdmin and tell me from the statistics if are server is running OK? Does it look like we will have problems as more people hit our server?...
3
by: sophie_newbie | last post by:
Hi, I want to store python text strings that characters like "é" "Č" in a mysql varchar text field. Now my problem is that mysql does not seem to accept these characters. I'm wondering if there...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.