Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Redirect
locationhttps://www.jetbrains.com/help/phpstorm/relational-databases.html
delay2

Include Page
Social Buttons PhpStorm
Social Buttons PhpStorm

...

The Table Editor as well as the Database Console support exporting data to the clipboard or a file. From the toolbar, we can select the desired output format, such as Comma-Separated Values (CSV), XML or JSON. We can also generate INSERT and UPDATE statements from the data so we can easily import it into a different database afterwards.

...

Using the Database Console

While the Table Editor gives us a number of options for working with data, it's limited to just one table and does not allow us to run an arbitrary SQL statement. The Database Console is a query editor in which we can write any SQL statement and run it. We can open the Database Console by pressing Ctrl+Shift+F10 (Shift-CMD-F10 on Mac OS X).

...

To run the query, we select the statement and press Ctrl+Enter. The result set (or query log) is displayed in a separate tool window.

The Table Editor as well as the Database Console support exporting data to the clipboard or a file. From the toolbar, we can select the desired output format, such as Comma-Separated Values (CSV), XML or JSON. We can also generate INSERT and UPDATE statements from the data so we can easily import it into a different database afterwards.

...

When browsing a table, we may want to see an example of where the selected value is referenced. Rather than generating a database diagram, we can instead press Ctrl+Q (Ctrl-J on Mac OS X) and get an example of how a given row is used throughout the database.

...

While writing our code, we can get all the features of the Database Console inside PHP, JavaScript, HTML or other languages. We can just start writing our SQL statement and after a while (typically right after the FROM), PhpStorm will provide us with code completion (Ctrl+Space). If completion is required earlier, for example to be able to complete column names, we can place the cursor in the string literal, write "SELECT", press Alt+Enter , and select the language to use (MySQL, for example).

...