Cognizant Interview Question

1-Difference between primary key and unique key. 2-Command to get a Substring from table.