Rebuild a table to remove a column (portable approach)

SQL Hard 2 views
Back to Questions

Problem Description

Some DBs cannot drop a column easily. Show a safe 3-step approach to remove column temp_flag from Orders.

Input Format

SQL script

Output Format

DDL/DML statements

Sample Test Case

Input:
Orders with temp_flag
Output:
Orders without temp_flag

Constraints

Use create-copy-swap pattern

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next