How do I use "mysql source" command with a mysql variable?
I need to execute from mysql shell an SQL file based on a condition like mysql> source @var where @var contains 开发者_Python百科the filename
This is not possible. source
is a command that is recognized and executed locally by the MySQL client program. Variables exist on the server, so the client has no idea what @variable
means.
精彩评论