我想SELECT id, some_complex_calculations FROM some_table
然后更新some_table
以将some_complex_calculations
插入其他具有相应ID的列中。我该怎么办?
答案 0 :(得分:1)
试试这个:
UPDATE some_table
SET other_column = some_complex_calculations
WHERE Id = 5; #appropiate ID
答案 1 :(得分:0)
如果我了解您的要求,那么这就是您想要的, UPDATE将替换现有行。但是你想要插入行,我想,
INSERT INTO SOME_TABLE(YOUR_OTHER_COLUMN)
VALUES(SELECT some_complex_calculations FROM some_table WHERE ID=4) #For Example