我正在试图找到一种方法来组合一个插入,它将根据另一列的值插入一个列值,例如
INSERT INTO table1
(col1a,col1b)
SELECT
(dependant of the value of col2b),
col2b
FROM table2;因此:
if col2b is 1 then col2a is A
if col2b is 2 then col2a is B
else col2a is C提前感谢
KS
发布于 2020-02-13 15:08:24
这与插入无关。
select
decode(col2b, 1, 'A', 2, 'B', 'C'),
col2b
from table2;https://dba.stackexchange.com/questions/259636
复制相似问题