2 messages in com.mysql.lists.mysqlPrimary Key
FromSent OnAttachments
Caroline Jen01 Jan 2004 22:42 
Martijn Tonies02 Jan 2004 01:12 
Subject:Primary Key
From:Caroline Jen (jiap@yahoo.com)
Date:01/01/2004 10:42:44 PM
List:com.mysql.lists.mysql

I saw an example of creating tables (see below). I wonder what the primary key (user_name, role_name) in the table user_roles means? Does it mean that both user_name and role_name are the primary key of the user_roles table? How does a table have two primary keys?

create table users ( user_name varchar(15) not null primary key, user_pass varchar(15) not null );

create table user_roles ( user_name varchar(15) not null, role_name varchar(15) not null, primary key (user_name, role_name) );