在VBA中使用SQL Server时,我可以通过以下语法将列名作为变量插入,但是连接到Mysql数据库时出现错误。
column_name = "kills"
Set rs = CreateObject("ADODB.Recordset")
SQLStr = "SELECT * FROM player_stats_aggregated order by [" & column_name & "] desc "
rs.Open SQLStr, conn, adOpenStatic
什么是正确的语法,以便我可以按“ kills”列的降序排列?