Run an SQL file
Right-click a data source.
Select Run SQL Script.
In the Select Path window, navigate to the SQL file that you want to apply.
Run an SQL file for several data sources
Select the necessary SQL file in the Project tool window.
Right-click the SQL file, select Run <file_name> (or press ⌃⇧R).
In the Execution target window, select the necessary data sources.
Run individual statements
Open an SQL file in AppCode.
Click the statement that you want to execute. If you want to execute more than one statement, select (highlight) the necessary statements.
Press ⌘⏎ or select Execute from the context menu.
Select the database console where you want to execute the statement.
Create an SQL file
In the Project tool window ( ), right-click the directory in which you want to create an SQL file and select .
In the New File dialog, specify the filename.
Specify an SQL dialect
For better coding assistance, assign an SQL dialect to an SQL file. An SQL dialect is a DBMS-specific version of SQL.
AppCode lets you specify the SQL dialect for an individual file, all SQL and DDL files in a directory, project, or on your computer.
Right-click the editing area in the SQL file and select Change Dialect (<CurrentDialect>).
Select a dialect from the dialect list and apply it to the current SQL file. If you want to apply the dialect to a set of files, select SQL Dialects.
In the SQL Dialects dialog, click the Add button and select directories or files for which you want to change a dialect.
Click the SQL Dialect cell and select the necessary dialect.
Apply changes and click OK.