Search
 
SCRIPT & CODE EXAMPLE
 

SQL

postgres integer to serial

CREATE SEQUENCE seq_tipo MINVALUE 1;
ALTER TABLE tipo 
ALTER codt SET DEFAULT nextval('seq_tipo');

/*insert into YOUR_COLUMN_NAME VALUES (nextval('seq_tipo'), 'value_2')*/
Comment

PREVIOUS NEXT
Code Example
Sql :: postgresql full text search 
Sql :: select random rows sql 
Sql :: sql rtrim 
Sql :: SQL Duplicates by Composite 
Sql :: duplicate key value violates unique constraint in postgresql 
Sql :: between keyword in sql 
Sql :: t_sql contains 
Sql :: min max sql 
Sql :: encrypt and decrypt in sql server 
Sql :: get initials name in sql 
Sql :: update table mysql 
Sql :: update column value in sql 
Sql :: sql select row with max date 
Sql :: clear table sql 
Sql :: multiple replace value mssql 
Sql :: run function in sql 
Sql :: oracle dynamic select into 
Sql :: import mysql database command line linux 
Sql :: sum mysql 
Sql :: SQL SELECT DISTINCT Statement 
Sql :: truncate table in sql 
Sql :: oracle create package body 
Sql :: oracle get ddl 
Sql :: SQL Error [42501]: ERROR: permission denied for table 
Sql :: sql script to remove default from column 
Sql :: insert select 
Sql :: json_remove mysql 
Sql :: psql check tables command 
Sql :: multiple order by sql 
Sql :: make parameters nullable in sql server 
ADD CONTENT
Topic
Content
Source link
Name
3+4 =