小编use*_*223的帖子

PostgreSQL:如何将空值插入到uuid

需要向uuid类型没有NOT NULL规范(非主键)的字段插入空值。

当我尝试插入 '' 时,返回:

ERROR:  invalid input syntax for uuid: ""
Run Code Online (Sandbox Code Playgroud)

当我尝试插入 null 时,返回:

ERROR:  null value in column "uuid" violates not-null constraint
Run Code Online (Sandbox Code Playgroud)

怎么做?

psql 9.3.5

SQL:

INSERT INTO inv_location (address_id)
VALUES (null)
Run Code Online (Sandbox Code Playgroud)

postgresql null sql-insert

5
推荐指数
2
解决办法
3万
查看次数

标签 统计

null ×1

postgresql ×1

sql-insert ×1