KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Is there a way (similar to the below code) to delete all the rows in a specified table using c#? SqlConnection con = new SqlConnection(conString); con.Open(); string sql = @"DELETE*FROM compsTickers;"; SqlCommand cmd = new SqlCommand(sql, con); cmd.ExecuteNonQuery(); con.Close(); Right now i'm getting an error: Incorrect syntax near '*'
Tags (comma-separated)
Save Edits
Cancel