我有以下代码:
BEGIN x := split_part(text, ',', 1); UPDATE albumphoto SET order = 1 WHERE idtable = 1 AND idx = x; END
但我的列表名idx是一个数字类型,并split_part返回一个字符类型的变量x.我尝试过使用CAST,但我不知道如何正确使用它.
idx
split_part
x
CAST
有任何想法吗?
postgresql types casting postgresql-9.1
casting ×1
postgresql ×1
postgresql-9.1 ×1
types ×1