This is what you can do with c#
DataTable table = GetTable(); // Get the data table.
foreach (DataRow row in table.Rows) // Loop over the rows.
{
string getvalue= row[1].ToString();
If( getvalue == your condition || getvalue == DBNull.Value)
{
table.Row.Remove(row[1]);
}
} }
Have you tried this
SqlCommand cmd = new SqlCommand("select * from yourtable", con);
con.Open();
SqlDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
string value=dr[0].ToString();
if (value == "yourcondition")
{
SqlCommand cmd2 = new SqlCommand("delete from yourtable where columnname ='"+value+"'", con2);
con2.Open();
cmd2.ExecuteNonQuery();
con2.Close();
}
} dr.Close();
con.Close();