I want to create a SQL command that adds record to DB. I tried the following code but it doesn\'t seem to be working:
SqlCommand comand = new SqlCommand(\"IN
In your case, it looks like you're using .NET. Using parameters is as easy as:
C#
string sql = "SELECT empSalary from employee where salary = @salary";
SqlConnection connection = new SqlConnection(/* connection info */);
SqlCommand command = new SqlCommand(sql, connection);
command.Parameters.AddWithValue("salary", txtSalary.Text);