0

I wanted something like this:
SELECT *Name FROM person
I would want this to return all the columns whose name has Name such as FirstName, LastName, MiddleName columns.

Is this possible in mySQL?

shrek
  • 887
  • 6
  • 12
Azimjon Ilkhomov
  • 383
  • 3
  • 13

1 Answers1

0

Following query can be used to list all fields having name keyword(LIKE operations) in the column name in entire DB exists in MYSQL Server:

SELECT 
table_schema "Database", table_name, column_name,ordinal_position "Field Position" 
FROM information_schema.columns WHERE column_name LIKE '%name%'
Suresh Gautam
  • 816
  • 8
  • 21