![]() |
primary key
ahm... i have been learning MySQL lately 'cause i want to use them in webpages with php.
but there is just one simple thing that i couldn't figure how to do it: How do you set a primary key in one of the fields? :confused: Thank You! |
It's been a while since i did sql but i believe that if you set a field to "not null" and "unique" it becomes a primary key.
:
CREATE TABLE mytbl(custname CHAR(20) NOT NULL UNIQUE); |
Thanks A lot! And please don't think that i was just been lazy, i did do some googling and searching in the forum...
|
:
CREATE TABLE mytbl |
| All times are GMT -5. The time now is 1:08 PM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC