string sql = "Insert Into mytable" + $" (Id, Name, otherName) Values" +
$" ('{id}','{name}','{otherName}')";
using (SqlCommand cmd = new SqlCommand(sql, sqlConnection))
{
cmd.ExecuteNonQuery();
}
And my problem is: some of my data has things like: in "otherName" columns, which will have some like "Mike's car". SQL server will put error on "'s", which I dont know how to fix on my code.
Thank you for reading. And sorry for my bad English.