Hi @css
Let me explain it to you like this using an example. We will use the same query, and say I assign a value to StrValue variable…
StrValue = “London”
Now, I will answer your questions one by one…
Yes, it is required to get the syntax correct. Think of two strings… How do we combine it?
“Hello” + " World"
The result of this is “Hello World”… It’s similar when it comes to Queries too… The query is also a string… and to combine the value in the variable and the string, we use the simple + sign just like above…
So, for now, just forget about this string stuff…
In databases, how do we write a query that has a condition under “Where” clause? simple example…
select * from myDatabase.dbo.MyTable Where ColumnName = ‘London’
That’s how we write a select query that filter the data in the result to the value of London… So in this query, you see that string values are wrapped with a single quote… That’s usual syntax in SQL
Now, coming back to your question,…
Here, the query is passed as a String and we need to pass the value we need the results to be filtered into using a varibale which is StrValue…
Earlier, we combined the two strings. Now, we need to get the SQL syntax right for the string values… So say we write the command like this
"SELECT * FROM MyDatabase.dbo.MyTable Where ColumnName = " + StrValue + " LIMIT 10"
If we print this String, the output will be
“SELECT * FROM MyDatabase.dbo.MyTable Where ColumnName = London LIMIT 10”
So… if you compare this with the actual syntax of the SQL, London will give you and error correct?
So how do we make it correct? its by adding those two single quotes… 
Why we do this is because when this is passed to the database, it actually sends the entire command as a string. So what we do here is actually building the SQL command with proper syntax 
Make sense?