1
Answer

String Variable in A SQL String

richard smith

richard smith

11y
810
1
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)