Search
 
SCRIPT & CODE EXAMPLE
 

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)
);
Comment

primary key multiple colums

ALTER TABLE Student
ADD CONSTRAINT PK_Student PRIMARY KEY (Rollno,LastName);
Comment

SQL Primary Key multiple column

ALTER TABLE Colleges
ADD CONSTRAINT CollegePK PRIMARY KEY (college_id, college_code);
Comment

PREVIOUS NEXT
Code Example
Sql :: how to access to mysql without root 
Sql :: sql server insert inner join 
Sql :: activate event scheduler mariadb 
Sql :: postgre alter table foreign key 
Sql :: sql show table info 
Sql :: between sql server 
Sql :: oracle partition table row count 
Sql :: select distinct after join 
Sql :: regexp in mysql 
Sql :: sql select where in 
Sql :: upper case sql 
Sql :: create date sql 
Sql :: regenerate assets odoo 
Sql :: check database sessions oracle 
Sql :: sql formats 
Sql :: data formate in sql 
Sql :: sql server md5 hash 
Sql :: mysql: command not found 
Sql :: createdb with postgresql on ubuntu 
Sql :: mysql get date from datetime 
Sql :: mysql order by date asc null last 
Sql :: mysql create table query 
Sql :: to_char sql 
Sql :: mysqldump database 
Sql :: sort order on two columns sql 
Sql :: postgresql conectar 
Sql :: how to tun mysql on ubunto 
Sql :: try catch sql 
Sql :: database stuck on restoring 
Sql :: mysql changer nom table 
ADD CONTENT
Topic
Content
Source link
Name
9+1 =