Search
 
SCRIPT & CODE EXAMPLE
 

SQL

create unique constraint postgres

//psql's inline help:
$ h ALTER TABLE

ALTER TABLE tablename ADD CONSTRAINT constraintname UNIQUE (columns);
Comment

postgresql create table add unique constraints

CREATE TABLE someTable (
    id serial PRIMARY KEY,
    col1 int NOT NULL,
    col2 int NOT NULL,
    UNIQUE (col1, col2)
)
Comment

PREVIOUS NEXT
Code Example
Sql :: finish transaction sql 
Sql :: choose only one for each distinct collumn regardless of other columns 
Sql :: how to get max salary in each department in sql 
Sql :: mysql insert rows to another database 
Sql :: mysql find max value row 
Sql :: what is relational database 
Sql :: what is non relational database 
Sql :: how to get last inserted id in sql server c# 
Sql :: sql composite key 
Sql :: sql group by 
Sql :: postgress if 
Sql :: date in mysql 
Sql :: arithmetic operators in sql 
Sql :: declare date variable sql 
Sql :: mssql remove duplicate rows 
Sql :: sql max min 
Sql :: enum in sql server 
Sql :: having clause in sql 
Sql :: mysql workbench format date 
Sql :: TRIGGER AFTER 
Sql :: mysql select database 
Sql :: what is truncate in sql 
Sql :: mysql check all tables 
Sql :: memberikan password root mysql 
Sql :: delete account in flask and sqlalchemy 
Sql :: cascade syntax in sql 
Sql :: rownum in sql 
Sql :: create column that already exists mysql 
Sql :: Find the names of sailors who have reserved a red boat, and list in the order of age 
Sql :: learn sql 
ADD CONTENT
Topic
Content
Source link
Name
8+1 =