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 :: display total number of tables in mysql 
Sql :: change name of colum in sql table 
Sql :: mssql cursor 
Sql :: mysql return if it contains 
Sql :: sql left join exists 
Sql :: insert into table from another table mysql 
Sql :: return sql query laravel 
Sql :: default password of mysql 
Sql :: postgresql add alter permissions to role 
Sql :: oracle add month 
Sql :: sqlserver create table from select 
Sql :: postgresql CREATE EXTENSION pgcrypto 
Sql :: FIND OUT THE NAME HIGHEST SALARY SQL 
Sql :: create row number in sql 
Sql :: ksql terminate all queries 
Sql :: python mysql search 
Sql :: strict in postgres SQL 
Sql :: sql to char 
Sql :: psql: FATAL: Ident authentication failed for user "postgres" 
Sql :: get monday of current week sql 
Sql :: what is mysql_pconnect 
Sql :: retrieve meaning 
Sql :: sql server date format dd/mm/yyyy 
Sql :: oracle sessions_per_user limit 
Sql :: sql create table if not exists 
Sql :: mysql - find in comma separated string of values 
Sql :: sql add column int nullable 
Sql :: how to create new user and database postgresql in ubuntu 
Sql :: list all the tables in sql 
Sql :: postgresql search object in array 
ADD CONTENT
Topic
Content
Source link
Name
1+7 =