Selecting single column or some columns using mysql query?

By | February 21, 2014

See the Example

Select * from mydoubts_data

+———+————————-+——————–+
| EMPCODE | NAME | SALARAY CODE |
+———+————————-+——————–+
| 787 | Vasanthan | K |
| GORT | Shaji | S |
| GKL | James | P |
| IND | Abdul | ZO |
| VIS | Sunil | F |
+———+————————-+——————–+

For only Name column we will use the following query.

Select Name from mydoubts_data where name=’vasanthan’

+———–
| NAME |
+———-+
| Vasanthan|
+———-+