Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

SQL Primary Key With Multiple Columns

CREATE TABLE Colleges (
  college_id INT,
  college_code VARCHAR(20),
  college_name VARCHAR(50),
  CONSTRAINT CollegePK PRIMARY KEY (college_id, college_code)
);
 
PREVIOUS NEXT
Tagged: #SQL #Primary #Key #With #Multiple #Columns
ADD COMMENT
Topic
Name
8+6 =