<p>In a database, I have a string that contains "default" written in it. I just want to replace that default with 0. I have something like: </p>

<pre><code>select * from tblname where test = 'default'
</code></pre>

<p>I do not want quotes in the replacement for "default".</p>

<p>I want </p>

<pre><code>select * from tblname where test = 0
</code></pre>

<p>is there any way to do this?</p>

I think you would be better using format strings
```
```
string myVar = "0";
string sql = String.Format(@"select * from tblname where test = \"{0}\"", myVar);
```
```
You should also ask yourself why you are generating inline SQL on the fly and not using stored procedures as this is how SQL injection attacks can occur unless you sanitize the input.