Include a common SELECT clasue block

Enissay posted 1 month ago in General


I am using multiple .sql files in my daily work. Most of them do have a common SELECT block.

The issue is that if I need to modify that SELECT clause, I'll have then to do the same in all files. Would it be possible to put that SELECT clause in a separate file SELECT.sql then import it somehow in my other .sql files to be loaded and executed flawlessly ?

This way I'll have only one location where to do the changes !

Cordially, Enissay

ansgar posted 1 month ago

Quite a common case, but not doable with HeidiSQL. You could run mysql(.exe) to import two .sql files.

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