mysql batch command

jika ingin melakukan eksekusi beberapa query dalam satu batch :

misalkan kita siapkan file batch query.txt dengan isi

select colA from TableA;
select colB from TableB;
select colC from TableC;

setelah file tersebut disimpan, bisa dieksekusi menggunakan command berikut :
mysql -h$host -u$user -p$password db_dbname < query.txt

Leave a Reply

Your email address will not be published. Required fields are marked *