distal-attribute
distal-attribute
distal-attribute
distal-attribute

IF statements

tomthirteen posted 1 month ago in General

Hello, does the IF statement work in Heidi? I would like to drop a table if empty, and I can't seem to get conditionals to work. Thanks!

kalvaro posted 1 month ago

HeidiSQL is just a client tool for some other program: MySQL Server. It doesn't have any language or syntax of its own.

MySQL documentation doesn't have a good search engine but a Google search like "mysql 5.7 whatever" normally finds the appropriate docs, e.g.:

mysql 5.7 drop tablehttps://dev.mysql.com/doc/en/drop-table.html

mysql 5.7 if conditionalhttps://dev.mysql.com/doc/refman/5.7/en/if.html

Remember that SQL is not a programming language. The syntax used in stored routines (which has programming stuff like flow control operators) is not really SQL although, unfortunately, MySQL doesn't give it a proper name as far as I can tell.

tomthirteen posted 1 month ago

Thank you. That clarifies things. Tom

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