How can I conditionally construct a table name for an SQL CREATE TABLE statement?

前端 未结 3 1903
孤独总比滥情好
孤独总比滥情好 2021-01-24 17:51

Within an SQL stored procedure, I would like to have the ability to construct a table name and create it.

Example: I just logged into my database under company 03 and a

3条回答
  •  旧巷少年郎
    2021-01-24 18:56

    Use the IF NOT EXISTS modifier to the CREATE TABLE statement. This will cause the table to be created only if it does not already exist.

提交回复
热议问题