How do I create a view only if it doesn't exist. If it does exist, I want to drop the view and redefine it. I also want no warnings or errors.
CREATE OR REPLACE VIEW <view name>
AS
<your select expression goes here>
来源:https://stackoverflow.com/questions/2245847/mysql-create-view-only-if-it-doesnt-already-exist