Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
假设sDatabase = "mytable"字符串格式
sDatabase = "mytable"
cmd.CommandText = "INSERT INTO test.target SELECT * FROM '" & sDatabase & "'.source"
这个查询给了我一个错误。
您不应该使用 '' 作为表名:
cmd.CommandText = "INSERT INTO test.target SELECT * FROM " & sDatabase & ".source"