Search
 
SCRIPT & CODE EXAMPLE
 

SQL

how to define a composite primary key in sql

CREATE TABLE person(id INT, 
					name TEXT,
					PRIMARY KEY (id, name)
				   );
Comment

composite primary key sql

CREATE TABLE student
(rollNumber INT, 
name VARCHAR(30), 
class VARCHAR(30), 
section VARCHAR(1), 
mobile VARCHAR(10),
PRIMARY KEY (rollNumber, mobile)); -- This thing
Comment

sql composite primary key

CREATE TABLE voting (
  QuestionID NUMERIC,
  MemberID NUMERIC,
  PRIMARY KEY (QuestionID, MemberID)
);
Comment

composite primary key sql

CREATE TABLE student
(rollNumber INT, 
name VARCHAR(30), 
class VARCHAR(30), 
section VARCHAR(1), 
mobile VARCHAR(10),
PRIMARY KEY (rollNumber, mobile));
Comment

PREVIOUS NEXT
Code Example
Sql :: mysql replace empty string with null 
Sql :: auto increment psql not primary key 
Sql :: mysql error 1452 
Sql :: what is like operator in sql 
Sql :: insert to first table if field A equals field B from a second table using sql 
Sql :: union sql 
Sql :: sql decimal with 2 places 
Sql :: mac mysql this is incompatible with sql_mode=only_full_group_by 
Sql :: oracle multiple insert 
Sql :: postgres jsonb array push new element 
Sql :: what is ssrs and ssis in sql server 
Sql :: can you write relational algebra into sql queries 
Sql :: select where sql 
Sql :: insert update sql server 
Sql :: mysql 5 minutes ago 
Sql :: exectuer myssql .sql 
Sql :: mysql create link between tablesdatabase 
Sql :: reona 
Sql :: sql tablo hangi sp de 
Sql :: HOW to select specific table data from an mysql databse server: 
Sql :: oracle single row functions 
Sql :: teller stamp , bmo , PDF 
Sql :: requete sql mise a jour content dans un colone mysql 
Sql :: select multiple columns count one column and group by one column in one table 
Sql :: update top 100 order by sql server 
Sql :: how to know which table has more data oracle sql 
Sql :: how to put value in parameters in mysqldataadapter 
Sql :: oracle test if 0 
Sql :: how we can perform acid Operations in sql with examples 
Sql :: how much table store postgres 
ADD CONTENT
Topic
Content
Source link
Name
9+7 =