【问题标题】:How can I save query results into a new column and save it in the table with SQL Oracle Live?如何使用 SQL Oracle Live 将查询结果保存到新列中并保存在表中?
【发布时间】:2021-01-21 19:11:01
【问题描述】:

这是查询:

SELECT ROUND(column_1,0) as new_column_to_save
FROM table_to_save_to

谢谢

【问题讨论】:

  • 插入..选择

标签: sql oracle live


【解决方案1】:

如果你想将它插入到一个新表中:

INSERT INTO NEWTableName ( colName)
SELECT ROUND(column_1,0) as new_column_to_save
FROM table_to_save_to

如果要更新同一个表中的列

UPDATE table_to_save_to
   SET new_column_to_save = ROUND(column_1,0)
FROM table_to_save_to

【讨论】:

    猜你喜欢
    • 2014-05-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-05-01
    • 2021-07-31
    • 2021-02-06
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多