command line - Pass argument to mysql script from mysql client -


is there way/workaround/hack pass argument mysql script? let's have file name myqueries.sql looks this

select * foobar id = <arg>; 

then in mysql command, know can call script by

mysql>source myqueries.sql 

but there way pass argument here? this:

mysql>source myqueries.sql 2 

then i'd tuple id = 2.

myqueries.sql

select * foobar id = @arg; 

on mysql

set @arg=2; source myqueries.sql 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -