Maracles Posted May 18, 2009 Share Posted May 18, 2009 I have just started learning mysql via phpmyadmin and was curious as to how primary keys are identified in the phpmyadmin interface. How can I tell which of my fields are primary keys and which are not, as I understand it there can only be one primary key per table? To set up my first database and tables I used the code provided in a book i'm learning from, the code is below. Using this example the 'customerid' field in the 'customer' table is a primary key however I can see know way of identifying this via phpmyadmin other than when you enter the initial code. Any help would be appreciated. create table customers ( customerid int unsigned not null auto_increment primary key, name char(50) not null, address char(100) not null, city char(30) not null ); create table orders ( orderid int unsigned not null auto_increment primary key, customerid int unsigned not null, amount float(6,2), date date not null ); create table books ( isbn char(13) not null primary key, author char(50), title char(100), price float(4,2) ); create table order_items ( orderid int unsigned not null, isbn char(13) not null, quantity tinyint unsigned, primary key (orderid, isbn) ); create table book_reviews ( isbn char(13) not null primary key, review text ); Link to comment https://forums.phpfreaks.com/topic/158554-solved-identifying-a-primary-key-in-phpmyadmin/ Share on other sites More sharing options...
Maracles Posted May 18, 2009 Author Share Posted May 18, 2009 I have found the answer from an alternative source - Primary Key fields are underlined. Link to comment https://forums.phpfreaks.com/topic/158554-solved-identifying-a-primary-key-in-phpmyadmin/#findComment-836300 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.