Choose your database:
AnySQL
MySQL
MS SQL Server
PostgreSQL
SQLite
Firebird
Oracle
SQL Anywhere
DB2
MaxDB

Subscribe to our news:
Partners
Testimonials
Johnattan Badden, Manager: "The software is easy to work with and most importantly, report management is extremely easy, even for a novice like me! I am able to create and edit my databases with a few clicks and easily maintain them afterwards. I highly recommend SQLite Maestro to educational institutions: it's easy and flexible, it is exactly what can be good for using in schools and colleges".
Ron D.: "I'm still very happy with SQLite Maestro and Data Wizard; makes my HTPC database much easier to manage".

More

Add your opinion

SQLite Maestro online Help

Prev Return to chapter overview Next

SQL Editor

SQL Editor is a tool for creating and executing SELECT queries. It allows you to create and edit SQL text for the query, prepare and execute queries, and view the results of execution. To open SQL Editor, select the Tools | SQL Editor main menu item. The most popular query management actions (creating, editing, deleting) are covered by the corresponding topic.

 

To use the editor for working with several queries, open new query tab with the Create new query link on the Navigation bar. With the tabs’ popup menu you can create a new query, close existing one, save the query to profile, etc even if editor's navigation bar is closed. Queries' tabs can been displayed at the all sides of the editor (bottom, top, left or right).

 

For more information about query executing and working with query result see the corresponding topic.

 

       Working with query text

 

The popup menu of the editing area provides you with standard operations for working with text such as Cut (Ctrl+X), Copy (Ctrl+C), Paste (Ctrl +V), Undo (Ctrl+Z), Redo (Shift+Ctrl+Z) along with a possibility to convert selected text to different cases (lower, UPPER, and NameCase).

 

You can also comment/uncomment selected text (Shift+Ctrl+. and Shift+Ctrl+, shortcuts respectively). If no text is selected, the whole line will be commented. By the way, it is not necessary to select commented text to uncomment it, just press Shift+Ctrl+, having the cursor inside the commented text. Both kinds of comments (single-line and multi-line) are supported. SQL Formatter is also at your disposal.

 

SQL Editor allows you to use Visual Query Builder modal instance to design query visually and load the result query text directly in the editor area. For this purpose use the Design query link of the editor area's popup menu.

 

       Code completion

 

SQLite Maestro provides you with code completion (as on the screen below) to select from a list of tables, columns, views, or other objects without having to manually enter the object's name in the editor. You can activate the completion list by pressing the Ctrl+Space key combination.

 

       Syntax  highlighting

 

Database objects are highlighted in the text. You can open the proper object editor by clicking the object name in the text with the Ctrl key pressed or with the Find Object link on the Navigation bar. To adjust the highlighting settings, use SQL highlight options.

 

       Line modification markers

 

Lines of code that have been edited during the current session are indicated with a yellow line in the left margin of the editor. When you save the file, the yellow markers turn green. Thus at any time, yellow markers show changed but unsaved lines of code, and green markers show changes in this session that have been saved.

 

       Find and replace text

 

Use find and replace to search for, and optionally, replace text in the SQL Editor. To open Find text/Replace text window, use Edit | Find/Replace main menu item, corresponding link of popup menu, or Ctrl+F/Ctrl+H shortcut. You can also use the Search again link to apply recent Find text dialog.

 

       Transaction management

 

SQL Editor supports the explicit transaction management. You can execute queries either in autocommit mode (default behavior) or manage transactions manually. In the second case you have to issue the BEGIN TRANSACTION statement to start a transaction and explicitly end the transaction by COMMIT or ROLLBACK statements (it is also possible to use the corresponding links at the editor's navigation bar).

 

       PRAGMA command executing

 

Using SQL Editor you can execute the PRAGMA command, that is not a part of SQL standard. The PRAGMA command is a special command used to modify the operation of the SQLite library or to query the library for internal (non-table) data. Using the PRAGMA command you can set the auto-vacuum flag in the database, change the maximum number of database disk pages that SQLite will hold in memory simultaneously, change the count-changes flag, etc.

 

 

To load query from .sql file, use the corresponding link on the Navigation bar. You can also find there links allowing you to save query text to file, export the contents of the editor to RTF and HTML formats (to file or to clipboard), copy the selected text from to clipboard as a ready-to-use string written in one of the following programming languages: C#, C++, Delphi (Object Pascal), and Java, and also print/preview the contents of the editor.

 

See also: Visual Query Builder, SQL Script Editor, SQL Editor Options



Prev Return to chapter overview Next