1

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.

Pramod
  • 2,828
  • 6
  • 31
  • 40
Swanand Pangam
  • 858
  • 1
  • 10
  • 25

1 Answers1

-1

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;
Pramod
  • 2,828
  • 6
  • 31
  • 40
  • So according to this, my column name in database table will be location and I can get result in the name of city, right? – Swanand Pangam Nov 14 '14 at 11:09
  • I dont think this will help - this query will retrieve location and output col name will be city - thats it. – krisskad Feb 27 '23 at 13:12