postgresql - add boolean column to table set default

后端 未结 5 442
感情败类
感情败类 2021-01-30 03:02

Is this proper postgresql syntax to add a column to a table with a default value of false

ALTER TABLE users
ADD \"priv_user\" BIT
ALTER priv_user SE         


        
5条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-30 03:14

    In psql alter column query syntax like this

    Alter table users add column priv_user boolean default false ;
    

    boolean value (true-false) save in DB like (t-f) value .

提交回复
热议问题