Open settings by pressing Ctrl+Alt+S and navigate to Languages & Frameworks | SQL Dialects.Ĭlick the Add button and select directories or files for which you want to change a dialect.Ĭlick the SQL Dialect cell and select the necessary dialect. Specify a dialect for a single SQL fileĬlick the dialect list, which is in the upper-right corner of the window. An SQL dialect is a DBMS-specific version of SQL.ĭataGrip lets you specify the SQL dialect for an individual file or all SQL and DDL files that can be stored in a directory, in your project, or on your computer. Configuring a dialect for SQL filesįor better coding assistance, assign an SQL dialect to an SQL file. Otherwise, you can associate a console with a file by selecting Attach Console from the context menu of the file. In the console menu, you can associate a different console with the file, or remove the association between the file and the console ( Detach Console). When you open a file that is larger than 20 MB, you see only the first 2.5 MB of the file. Replace line 16 (use sakila) in the sql-server-sakila-schema.sql file with the following: IF DBID (N'sakila')IS NOT NULL DROP DATABASE sakila GO CREATE DATABASE sakila GO USE sakila GO Next, add a new file called sql-server-sakila-spInsertActor. Limitation for the SQL file size is 20 MB. Select the query console where you want to execute the statement. Press Ctrl+Enter or select Execute from the context menu. If you want to execute more than one statement, select (highlight) the necessary statements. Run individual statementsĬlick the statement that you want to execute. Before you run these statements, specify values of these parameters. You can run individual statements only for one data source at a time.
To see a full list of data sources, click the Filter button. In the Target data source / schema pane, click the Add button ( ) and select the necessary data sources. Right-click the SQL file, select Run (or press Ctrl+Shift+F10). Select the necessary SQL file in the Files tool window. In the Select Path window, navigate to the SQL file that you want to apply. In the notification dialog, click Detach. Right-click the selection and click Detach Directory from Project.
In the Files tool window ( View | Tool Windows | Files), press Ctrl and select the directories that you want to detach. Detach directories from the Files tool window You can find the attached directory in the Files tool window ( View | Tool Windows | Files). Navigate to the directory that you want to attach.Īlso, to attach a directory, navigate to File | Open and select the directory in the file browser. In the Files tool window, right-click any area and select Attach Directory to Project. Managing directories Attach a directory with SQL files To work with files from your machine or any other place you have access to, attach the directory you need to the Files tool window.