MySql 'source file.sql' statement in query tab ?

[expired user #11564]'s profile image [expired user #11564] posted 6 years ago in General Permalink

Hello,

I'm testing a scenario. Therefore I have to 'reset' the database to an initial state many times, as development progresses.

I dumped some tables into a .sql file (can be run from HeidiSql via File menu Run SQL file...).

But now I want to run a sql file from within a query tab. Mysql.exe has the 'source file.sql;' statement. Is there an equivalent statement in HeidiSql ?

e.g.

drop table if exists sometable;

source d:\dump.sql;

insert into sometable (a,b,c) values (1,2,3);

Thanks,

Mirco Babin

ansgar's profile image ansgar posted 6 years ago Permalink

That source is a client-side command, and it's not supported by HeidiSQL. The only client command supported by HeidiSQL is DELIMITER to change the current SQL query delimiter (defaults to ;)

Please login to leave a reply, or register at first.