Please someone tell me the command for searching in whole table of a database,
like If I want to search whole table (not by any single field or column)
For example, I want something similar command to this
SELECT * FROM `school_table` like '%mohan%'
Please note, I know the other command for searching but that is only for searching in any particular row, for example.
SELECT * FROM `school_table` where name like '%mohan%'
yes sure, For example, I want to return all the columns (e.g. ID, Name etc.) of a table, where any field name is consisting of my name.
My name is mohan.
So, if a table consists of mohan anywhere in it, it should return me that column.
What is the command of searching this thing in a table of mysql?
For example, I have a record mohan in one of my mysql-table, and when i search the database by the name mohan, it returns the rows wherever the column has name mohan in it.
select * from names where name like '%mohan%'
This is very simple.
But I felt said when I searched by the name moh an, there was no rows returned.
and the same thing happened when i searched moh-an.
something like
select * from names where name like '%mo han%'
or
select * from names where name like '%mo-han%'
Is there any way to search all the characters in that column name and figure out what i want?