In message <[EMAIL PROTECTED]>, onurdyh <[EMAIL PROTECTED]> writes > > hi everybody I have problem and if you help me I glad.I have created a table >without primary key but now I want to add a primary key to the table how can I >make it?? > thankss
You can do it with the SQL commands... TO add a new field as primary key, alter table mytable add column `prifield` int NOT NULL first, add primary key (`prifield` ) I like my primary keys to be 'first field' in the table, simply for organisation. To change an existing field to primary key ALTER TABLE mytable change `fieldx` `fieldx` int (11) NOT NULL , add primary key (`fieldx` ) -- Pete Clark http://www.hotcosta.com http://www.spanishholidaybookings.com The php_mysql group is dedicated to learn more about the PHP/MySQL web database possibilities through group learning. Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php_mysql/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
