相关疑难解决方法(0)

Postgresql将列类型从int更改为UUID

我想将列类型从inta 更改为a uuid.我使用以下声明

ALTER TABLE tableA ALTER COLUMN colA SET DATA TYPE UUID;
Run Code Online (Sandbox Code Playgroud)

但是我收到了错误消息

ERROR:  column "colA" cannot be cast automatically to type uuid
HINT:  Specify a USING expression to perform the conversion.
Run Code Online (Sandbox Code Playgroud)

我很困惑如何USING用来做演员表.

postgresql

34
推荐指数
6
解决办法
3万
查看次数

标签 统计

postgresql ×1