标签: mysql vb.net
假设字符串格式为sDatabase = "mytable"
sDatabase = "mytable"
cmd.CommandText = "INSERT INTO test.target SELECT * FROM '" & sDatabase & "'.source"
此查询给我一个错误。
答案 0 :(得分:0)
您不应该使用''作为表名:
cmd.CommandText = "INSERT INTO test.target SELECT * FROM " & sDatabase & ".source"