Is there any use to duplicate column names in a table?

后端 未结 3 1648
太阳男子
太阳男子 2021-01-23 02:24

In sqlite3, I can force two columns to alias to the same name, as in the following query:

SELECT field_one AS overloaded_name,
       field_two AS overloaded_nam         


        
3条回答
  •  一个人的身影
    2021-01-23 03:04

    The table itself can't have duplicate column names because inserting and updating would be messed up. Which column gets the data?

    During selects the "duplicates" are just column labels so do not hurt anything.

提交回复
热议问题