Getting Started with SQLife
This guide will help you get up and running with SQLife quickly.
Table of Contents
- First Launch
- Setting Your Language
- Creating Your First Connection
- Understanding the Interface
- Running Your First Query
- Browsing Database Objects
- Next Steps
First Launch
When you launch SQLife for the first time, the application will:
- Create application directory in your home folder (
~/.sqlife/) - Initialize local database for storing settings and connections
- Show the main window with the connection manager
License Activation (Optional)
If this is your first time:
- Trial Mode: You can evaluate SQLife for free
- Licensed Use: Go to Help → License and enter your license key
For now, you can proceed with the trial or skip this step.
Setting Your Language
SQLife supports more than 10 languages. To change the language:
-
Open Preferences:
- Windows/Linux: File → Preferences (or press Ctrl + ,)
- macOS: SQLife → Preferences (or press Cmd + ,)
-
Navigate to General section
-
Select your preferred language from the Language dropdown
-
Click OK or Apply
-
Restart SQLife for the language change to take effect
Creating Your First Connection
Oracle Database Connection
-
Open Connection Manager:
- Click the New Connection tab, or
- Press Cmd/Ctrl + N
-
Enter connection details:
- Connection Name: Give it a meaningful name (e.g., "Development DB")
- Database Type: Oracle
- Host: Database server address (e.g.,
localhostor192.168.1.100) - Port: Default is
1521 - SID/Service Name: Your database identifier (e.g.,
ORCL) - Username: Database user (e.g.,
SCOTT) - Password: User password
if Oracle database provide service over Service Name, you probably need to add a slash "/" before service name.
-
Advanced options (optional):
- Role: NORMAL, SYSDBA, or SYSOPER
- Connection Type: Basic or TNS
-
Test the connection:
- Click Test Connection button
- Wait for the result
- If successful, you'll see a success message
- If it fails, check your credentials and network connectivity
-
Save the connection:
- Click Save button
- Your connection appears in the connections list
-
Connect:
- Double-click the connection, or
- Right-click and select Connect
MySQL Database Connection
-
Open Connection Manager (Cmd/Ctrl + N)
-
Enter connection details:
- Connection Name: (e.g., "MySQL Local")
- Database Type: MySQL
- Host:
localhostor server address - Port: Default is
3306 - Database: Database name (e.g.,
myapp) - Username: (e.g.,
root) - Password: User password
-
Test and save as described above
PostgreSQL Database Connection
-
Open Connection Manager (Cmd/Ctrl + N)
-
Enter connection details:
- Connection Name: (e.g., "Postgres Dev")
- Database Type: PostgreSQL
- Host:
localhostor server address - Port: Default is
5432 - Database: Database name (e.g.,
postgres) - Username: (e.g.,
postgres) - Password: User password
-
Test and save as described above
SQLite Database Connection
-
Open Connection Manager (Cmd/Ctrl + N)
-
Enter connection details:
- Connection Name: (e.g., "Local SQLite")
- Database Type: SQLite
- Database File: Click Browse and select your
.dbfile
-
Test and save
Other databases' connection are similar.
Understanding the Interface
Once connected, you'll see the main SQLife interface:
Main Window Layout
┌────────────────────────────────────────────────────────────────────────┐
│ Menu Bar (File, Edit, Database, View, Help) │
├────────────────────────────────────────────────────────────────────────┤
│ Toolbar (New, Open, Save, Run, etc.) │
├──────────┬─────────────────────────────────────────────────────────────┤
│ │ Tab Bar (Connection/Workbench Tabs) │
│ ├─────────────────────────────────────────────────────────────┤
│ Side │ │
│ Bar │ SQL Editor │
│ │ (Write your queries here) │
│ - Objects│ │
│ - Scripts│─────────────────────────────────────────────────────────────│
│ │ Data View / Results │
│ │ (Query results appear here) │
├──────────┴─────────────────────────────────────────────────────────────┤
│ Status Bar (Messages, Position, Encoding, Current Schema, etc.) │
└────────────────────────────────────────────────────────────────────────┘
Key Areas
- Menu Bar: Access all application features
- Toolbar: Quick access to common operations
- Tab Bar: Multiple workbenches and file tabs
- Side Bar (Left): Navigate database objects and files
- Objects Tab: Browse schemas, tables, views, etc.
- Scripts Tab: Access workspace files and Git repository
- SQL Editor: Write and edit SQL queries
- Data View: View and edit query results
- Status Bar: Shows messages, cursor position, encoding, current schema, etc.
Side Bar - Objects Tab
The Objects tab shows your database structure:
- Schema dropdown: Select which schema to browse
- Object tree:
- 📁 Tables
- 📁 Views
- 📁 Procedures
- 📁 Functions
- 📁 Indexes
- 📁 Triggers
- 📁 Sequences
- (And more, depending on database type)
Filter objects: Type in the filter box to quickly find objects
Side Bar - Scripts Tab
The Scripts tab shows your workspace:
- File tree: Browse local SQL files
- Filter: Search for specific files
- Git integration: If your workspace is a Git repository, you can view file history
Side Bar - Outline Tab
The Outline tab displays a real-time hierarchical tree view of the SQL blocks in your currently active editor.
- Automatic parsing: As you type, SQLife parses your SQL in the background and updates the tree
- Block types shown: Procedures
[PROC], Functions[FUNC], Packages[PKG], Triggers[TRIG], Views[VIEW], SQL statements[SQL], and anonymous blocks[BLOCK] - Navigate by click: Click any block in the tree to jump the editor caret directly to that block's location
- Popup mode: Open the outline as a floating window via the keyboard shortcut for quick navigation across large SQL files
Side Bar - Function Tab
The Function tab provides a searchable list of built-in database functions and routines for the connected database type.
- Search: Type in the filter box to find functions by name or description
- Double-click to insert: Double-click a function to insert its name into the active SQL editor
- Rich info: Each entry shows the function name along with its description/comment
- Auto-loaded: Functions are loaded from a cached catalog of the connected database's built-in routines after connection
Side Bar - SFTP Tab
The SFTP tab provides an embedded remote file browser for connecting to servers via SSH/SFTP.
- Connection management: Select from saved SFTP connections, or add a new one with host, port, user, and authentication (password or key-based)
- Browse remote files: View files with name, permissions, size, and modification date; double-click directories to navigate
- File operations: Upload, download, create new files/folders, rename, and delete — all from the context menu
- Open in editor: Open remote text files (
.sql,.xml,.json,.properties, etc.) directly in the SQL editor; saving auto-uploads changes back - Progress tracking: Upload and download progress is shown in the file table with a cancel option
Running Your First Query
Write a Simple Query
-
In the SQL Editor area, type a simple query:
For Oracle:
SELECT * FROM DUAL;For MySQL:
SELECT 1 + 1 AS result;For PostgreSQL:
SELECT version(); -
Execute the query:
- Press Ctrl/Command + Enter, or
- Click the Run button in the toolbar, or
- Use menu: Database → Run
-
View results:
- Results appear in the Data View below the editor
- You'll see rows, columns, and values
Run Selected SQL
If you have multiple statements, you can run just one:
- Select the SQL statement you want to run
- Press Ctrl/Command + Enter or click Run
- Only the selected SQL is executed
Run Multiple Statements
To run multiple statements in sequence:
- Write multiple statements (separated by semicolons for most databases)
- Make sure no SQL is selected
- Press Ctrl/Command + Enter or click Run
- Each statement executes in order
- Multiple result sets appear in tabs
Commit and Rollback
SQLife uses manual commit mode (autocommit = false):
- Commit changes: Press Cmd/Ctrl + Shift + C or Database → Commit
- Rollback changes: Press Cmd/Ctrl + Shift + R or Database → Rollback
Important: Remember to commit INSERT, UPDATE, DELETE statements!
Some analysis database do not support transaction.
Browsing Database Objects
Viewing Table Data
- Expand the Tables folder in the Objects tab
- Right-click a table
- Select Query Data
- The table data loads in the Data View
Viewing Table Structure
- Right-click a table
- Select Property
- The table property window opens, showing:
- Basic information
- Columns and data types
- Indexes
- Constraints
- Triggers
- Partitions (if any)
Viewing Object Definition (DDL)
To see the SQL that creates an object:
- Right-click any object (table, view, procedure, etc.)
- Select Object Definition
- The DDL appears in a new editor tab
Editing Table Data
- Right-click a table
- Select Edit Data
- The data view opens in edit mode (unlocked)
- Click cells to edit values
- Use the toolbar:
- Add Row: Insert new row
- Remove Row: Delete selected rows
- Save: Commit changes to database
- Refresh: Reload data
Note: See Exploring Objects and Executing SQL and Object Explorer for detailed editing instructions.
Tips for New Users
Keyboard Shortcuts
Learn these essential shortcuts:
| Action | Windows/Linux | macOS |
|---|---|---|
| New File | Ctrl + N | Cmd + N |
| Open File | Ctrl + O | Cmd + O |
| Save File | Ctrl + S | Cmd + S |
| Run Query | Ctrl + Enter | Cmd + Enter |
| Commit | Ctrl + Shift + C | Cmd + Shift + C |
| Rollback | Ctrl + Shift + R | Cmd + Shift + R |
| Format SQL | Ctrl + Shift + F | Cmd + Shift + F |
| Find | Ctrl + F | Cmd + F |
| Replace | Check Key Mapping | Check Key Mapping |
| Comment/Uncomment | Ctrl + / | Cmd + / |
| Trigger Suggestion | Ctrl + Shift + P | Cmd + Shift + P |
| Outline tab | Ctrl + O | Cmd + O |
| Quick Query | Alt + Space | Option + Space |
| Preferences | Ctrl + , | Cmd + , |
Shortcuts are configurable. Check Preferences -> Key Mapping for the current assignment.
SQL Editor Features
- Syntax highlighting: SQL keywords are colored
- Auto-completion: Press Ctrl + Space for suggestions
- Code formatting: Press Ctrl + Shift + F to format
- Line numbers: Visible on the left
- Error highlighting: Syntax errors are underlined
Working with Multiple Tabs
- New workbench tab: Click + in the tab bar
- Close tab: Click × on the tab
- Rename tab: Double-click the tab title
- Clone tab: Right-click and select Clone
- Close others: Right-click and select Close Others
Saving Your Work
- SQL files: Use File → Save (Ctrl/Cmd + S)
- Auto-recovery: SQLife auto-saves state for crash recovery
- Connection backup: Use File → Backup Connections regularly
Getting Help
- Press F1 or Help → Help for online documentation
- Check Help → About for version information
- Visit the FAQ for common questions
Common First-Time Tasks
Task 1: Query a Table
-- Example for Oracle
SELECT employee_id, first_name, last_name, email
FROM employees
WHERE department_id = 10;
- Write the query in the editor
- Press Ctrl/Command + Enter to execute
- View results in the Data View
Task 2: Insert Data
-- Example
INSERT INTO employees (employee_id, first_name, last_name, email, hire_date)
VALUES (1001, 'John', 'Doe', 'jdoe@company.com', SYSDATE);
- Write the INSERT statement
- Press Ctrl/Command + Enter to execute
- Important: Press Ctrl/Cmd + Shift + C to commit!
Task 3: Export Query Results
- Run a query to get results
- Click the Export button in the Data View toolbar
- Choose format (Excel, CSV, etc.)
- Select location and click Export
Task 4: Import Data from Excel
- Go to Database → Import
- Select target table
- Choose Excel file
- Map columns
- Click Import
See Export Objects and Data and Import Data for details.
Next Steps
Now that you're familiar with the basics:
-
Explore more features:
- Connection Management - Manage multiple connections
- Exploring Objects and Executing SQL - Master the editor features
- Object Explorer - Navigate database objects
- Export Objects and Data - Export database objects (DDL) and data
- Import Data - Import data from Excel, CSV, and TSV files
-
Customize SQLife:
- Change Preferences - Personalize your experience
-
Try advanced features:
Congratulations! You're now ready to use SQLife for your database management tasks.
Happy querying! 🐰