gpt4 book ai didi

database - postgresql 中 CREATE VIEW IF NOT EXISTS 的等价物是什么

转载 作者:太空狗 更新时间:2023-10-30 01:50:31 26 4
gpt4 key购买 nike

我想做类似的事情

CREATE VIEW IF NOT EXISTS complete_user_profile ...

不知道怎么样

最佳答案

你可以使用 CREATE OR REPLACE :

CREATE OR REPLACE VIEW is similar, but if a view of the same name already exists, it is replaced. The new query must generate the same columns that were generated by the existing view query (that is, the same column names in the same order and with the same data types), but it may add additional columns to the end of the list. The calculations giving rise to the output columns may be completely different.

CREATE OR REPLACE VIEW complete_user_profile ...

关于database - postgresql 中 CREATE VIEW IF NOT EXISTS 的等价物是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48662843/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com