System.Data.SqlClient.SqlException: Incorrect syntax near '

Aug 21 2012 4:38 AM
    SqlConnection con = new SqlConnection("Data Source=APPLE;Initial Catalog=sam;Integrated Security=True");
            SqlCommand cmd = new SqlCommand();
            cmd.Connection = con;
            con.Open();
            string str1 = "DELETE * FROM AU_Delete";
            cmd.CommandText = str1;
            cmd.ExecuteNonQuery();
            con.Close();
           

This is  my coding for delete button it's showing error : Exception Details: System.Data.SqlClient.SqlException: Incorrect syntax near '*'.

what is the problem in my coding?

Answers (3)