How to create composite key

and how to set primary key for more than one column in a table