Run Simple SQL statement on dbForge query window directly

I want to run a sql statement on dbForge SQL window, but got error:

if (ifnull(null,'s') = 's') then
select 's';
end if;

Error:

1 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'if (ifnull(null,'s') = 's') then
select 's'' at line 2 SQL1.sql 2 1

I have to put that statement within a stored procedure to test it.

How to run the statement directly on SQL window, like SQL Server management studio.

Answers


Of course you can run this in SQL Server Management Studio, because it is Sql Server.

Now, you trying to run this statements as a script in MySQL, and get an error. That is right, MySQL doesn't support IF, CASE, LOOP, WHILE and other flow control constructs in the script. You only can use them in stored procedures, functions, triggers and events.

Flow Control Statements.


Need Your Help

Symfony2 disable logs in test environment

php symfony logging config monolog

How to disable any logs in test environment? Question related to correct monolog setup in config_test.yml file, that inherited from config_dev.yml, where config looks like this:

Change MergedDictionaries at runtime

c# wpf exception themes scrollbar

I'm currently working on a WPF application that allows the user to change its theme during runtime (without any restart). I'm currently using the code from here: