开发者

How do I use "mysql source" command with a mysql variable?

开发者 https://www.devze.com 2022-12-09 13:06 出处:网络
I need to execute from mysql shell an SQL file based on a condition like mysql> source @var where @var contains 开发者_Python百科the filenameThis is not possible. source is a command that is recognize

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消