How to add multiple names to attribute or columns in MySQL database table

1.2k Views Asked by At

I have a database named Football with a table named Club. My team columns are club_name, location, manager and established.

I need to know, how to add two or more names to same column. Like for example, in order to find location, I can type city instead of location. Or write coach instead of manager.

Or should I have to make another column with same data but different name.

1

There are 1 best solutions below

2
On BEST ANSWER

Its not a good idea to have duplicate columns in the table, rather you can use column alias while retrieving the data. e.g.

In order to find location, and want its column name in the result like city you can write query :

SELECT location AS city FROM table_name;