ALTER TABLE user_login ALTER COLUMN dob date;
psql中的此正确查询是否可以修改列的数据类型?
No, you need to include TYPE
. It should be
ALTER TABLE user_login ALTER COLUMN dob TYPE date
See the documentation . You're probably confused with ADD COLUMN
where you can omit the TYPE
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.