-1

I have a table with column like this id, email, phone, first name, last name I want to select phone corresponding to a particular email like this

Select phone from customer_tbl where email='testfinal@gmail.com';

this is working but if do something simailar for first name than it is not working, now the issue is due to space in column name.

Select first name from customer_tbl where email='testfinal@gmail.com';

It is giving below error.

Error Code: 1054. Unknown column 'first' in 'field list'

yatharth meena
  • 369
  • 4
  • 13

1 Answers1

1
 Select `first name` from customer_tbl where email='testfinal@gmail.com';

add the ``

Strawberry
  • 33,750
  • 13
  • 40
  • 57
Eduards
  • 1,734
  • 2
  • 12
  • 37