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 :: sql average 
Sql :: import Data in MySQL without using any other software 
Sql :: denormalization in sql example 
Sql :: mysql copy row with new id 
Sql :: REMOVE DATE FROM DATE TIME SQL SERVER 
Sql :: mysql workbench view 
Sql :: drop a field in psql django 
Sql :: cte in sql server 
Sql :: mysql set column equal to another automatic 
Sql :: pl sql command line run 
Sql :: query only first letter string 
Sql :: postgresql create user roles 
Sql :: mysql show create db 
Sql :: inserting values in sql 
Sql :: Oracle SQL join three tables and group by column 
Sql :: sql select only row with the max date 
Sql :: SQL Addition Operator 
Sql :: sql queries practice 
Sql :: mysql null 
Sql :: sql stored procedure output parameters 
Sql :: mysql error 1452 
Sql :: stuff and replace in sql 
Sql :: sqlite csv 
Sql :: is not null sql 
Sql :: sql query examples 
Sql :: identitye atama yapma SQL 
Sql :: sqlalchemy get sql 
Sql :: how to order result of subquery in select 
Sql :: flush user resource mysql 
Sql :: sql server: concatinate column value without trailing or leading comma 
ADD CONTENT
Topic
Content
Source link
Name
3+1 =