Is prefixing each field name in a table with abbreviated table name a good practice?

后端 未结 14 1999
-上瘾入骨i
-上瘾入骨i 2020-12-16 19:26

Do you prefix each field in a table with abbreviated table name?

Example:

Table: User

Fields:
user_id
user_name
user_password

Or d

14条回答
  •  北海茫月
    2020-12-16 20:18

    if you do it you will end up writing queries like:

    SELECT user.user_name, user.user_password, user.user_firstname ...
    

    instead of

    SELECT user.name, user.password, user.firstname
    

    so IMO the answer to your question is quite clear.

提交回复
热议问题