Reputation: 1199
One of my database table columns have name like 'name@from'
how can i write select query for get all values for name@from columns
this query gave to me error
SELECT `name@from` FROM tabName
Upvotes: 1
Views: 279
Reputation: 4925
SELECT "name@from" FROM tabName;
will do the trick
Permitted characters in unquoted identifiers:
ASCII: [0-9,a-z,A-Z$_] (basic Latin letters, digits 0-9, dollar, underscore)
However, if the ANSI_QUOTES SQL mode is enabled, it is also permissible to quote identifiers with other characters.
Upvotes: 0