richard smith

richard smith

  • 1.5k
  • 285
  • 160.2k

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)