
Given 2 column X and Y. How to create a primary key on the table?

Given 2 column X and Y. How to create a primary key on the table?
Easy:
CREATE TABLE SAMPLE_TABLE
(X integer,
Y varchar(1),
PRIMARY KEY (X, Y));
The term you are looking for is composite or compound key. I got this answer by referencing this link and this post, so please research other posts before asking here.