You can use the @DesignMode parameter in your SQL script to detect if the script is executed by either Ventura SQL Studio or the Ventura SQL runtime.


The data type of @DesignMode is Bit (boolean).


The parameter is declared automatically by Ventura SQL.


@DesignMode has a value of 1 when the SQL statement is executed by Ventura SQL Studio.


@DesignMode has value 0 when executed by the Ventura SQL runtime.


A Transact-SQL example where the INSERT statement is only executed at runtime:



The parameter prefix '@' can be different for some ADO.NET Providers.