Search
 
SCRIPT & CODE EXAMPLE
 

SQL

postgres alter table add column with default value

ALTER TABLE <TableName> ADD COLUMN <ColumnName> <ColumnType> NOT NULL default <DefaultValue>;

ALTER TABLE customers ADD COLUMN phone integer NOT NULL default 0;
ALTER TABLE customers ADD COLUMN gender varchar(255) NULL default 'Other';
Comment

add column postgres with default value

ALTER TABLE users
  ADD COLUMN "priv_user" BOOLEAN DEFAULT FALSE;
Comment

PREVIOUS NEXT
Code Example
Sql :: alter table add column 
Sql :: alter table sql 
Sql :: mysql trim whitespace 
Sql :: describe table query in postgresql 
Sql :: sysdate in sql 
Sql :: how to check current user in mysql 
Sql :: mysql update set sum 
Sql :: ora-00054 find lock 
Sql :: alter table oracle 
Sql :: psql client write to bash variable 
Sql :: postgres in operator with comma separated values 
Sql :: centos 8 install mysql 
Sql :: find wordpress version in database 
Sql :: mysql convert column to uppercase 
Sql :: mysql parse int 
Sql :: An error occurred while installing mysql2 (0.3.20), and Bundler cannot continue. 
Sql :: sysdate in oracle sql 
Sql :: python mysql query to dataframe 
Sql :: create in sql 
Sql :: mysql size of table 
Sql :: mysql select another database 
Sql :: python how escape sql 
Sql :: mysql find missing values 
Sql :: spring import sql 
Sql :: truncate statement in sql 
Sql :: mysql inner join 3 tables 
Sql :: how to update date value in sql 
Sql :: create table in mysql 
Sql :: CONCAT_WS() concat function in mysql 
Sql :: oracle sql create table from select 
ADD CONTENT
Topic
Content
Source link
Name
7+6 =