I have three tables that have the exact same columns, the only difference is the data in those columns. I was wondering if (and how) I should merge the columns into one table. I know that the data would be distinguishable by a boolean value if you merge two tables, but can the same be done with three tables?
Any help would be appreciated.
If the columns and datatypes are the same, then you can use a
UNION ALLquery.This version will include any duplicate records, if you don’t want duplicates then you can use
UNIONwhich will remove any duplicated records.If the datatypes are not the same, then you will need to convert the data to be of the same type.