SQL 语句动态写法 ?在线等
SQL 语句能这样写吗 我要查询的是动态的 可变的
SqlConnection con = new SqlConnection("server=localhost;database=7daydian;uid=sa;pwd=1234"); string dia = "dianliang"; string sql = "select '"+dia+"' from tongji order by shijian"; SqlCommand com = new SqlCommand(sql, con);