错误提示Invalid column name tcc2
表 tcc2怎么变成列column了呢?
直接drop table tcc2 就可以
name tcc[i]提示Incorrect syntax near 'i'.
name tcc"+i.ToString()+"也不行 for (int i = 2; i <= 12; i++)
            {
                string yu7 = "select count(*) from sysobjects where name = tcc"+i.ToString()+" and type = 'U' ";
                SqlCommand gh7 = new SqlCommand(yu7, con);                if ((int)gh7.ExecuteScalar() >= 1)
                {
                    SqlCommand tb7 = new SqlCommand("drop table tcc"+i.ToString()+"", con);
                    tb7.ExecuteNonQuery();
                }
            }