User files
This functionality relies on the Database Tools and SQL plugin, which is bundled and enabled in JetBrains Rider by default. If the relevant features are not available, make sure that you did not disable the plugin.
Press CtrlAlt0S to open settings and then select Plugins.
Open the Installed tab, find the Database Tools and SQL plugin, and select the checkbox next to the plugin name.
User files are the files that are stored on your machine or any other place you have access to. To work with them in JetBrains Rider, access the directory that contains them in the Explorer tool window .
You can view, edit, create, and delete the SQL files.
In the Explorer tool window (View | Tool Windows | Explorer) , right-click the directory in which you want to create an SQL file and select New | File.
In the New File dialog, specify the filename with the SQL extension.
Do one of the following:
Right-click the solution node in the Explorer tool window, choose Add | Existing Folder, and then select a folder.
Switch the Solution Explorer to the File System view, right-click the folder that you want to add and choose Tools | Attach to Solution
The folder will appear in the Solution Explorer marked as attached:
To remove an external directory from the solution, make sure that the Solution Explorer is switched to the Solution view, right-click the directory, and choose Detach Folder. The external directory will be removed from the solution view, but not from disk.
SQL files are run against the selected databases or schemas using run configurations. To run an SQL file, you can either create a new run configuration, or edit an existing one.
For more information about running SQL files from your machine, refer to Run SQL files.
For better coding assistance, assign an SQL dialect to an SQL file. An SQL dialect is a DBMS-specific version of SQL.
JetBrains Rider 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.
Click the dialect list, which is in the upper-right corner of the window.
Select a dialect from the dialect list.
Open settings by pressing CtrlAlt0S and navigate to Languages & Frameworks | SQL Dialects. .
Click the Add button
and select directories or files for which you want to change a dialect.
Click Open.
Click the SQL Dialect cell and select the necessary dialect.
Apply changes and click OK.