richard smith

richard smith

  • 1.4k
  • 285
  • 160.8k

String Variable in A SQL String

Jan 29 2013 10:34 AM
How could I use a string variable in a SQL string?

For example:
string listedCity;

"Select FName, LName, City, State, Zip, Address, Phone where City = " + listedCity + ");

But that is not correct syntax.  What would be the correct syntax?

Answers (1)