Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
S

sqlline

> 编程语言
Open source

Shell for issuing SQL to relational databases via JDBC

654 stars0 likes0 views
WebsiteGitHub

About

Shell for issuing SQL to relational databases via JDBC

Command-line shell for issuing SQL to relational databases via JDBC.

History

A fork of Marc Prud'hommeaux's sqlline project, also incorporating changes made by the LucidDB project, now modernized, mavenized and forkable in github. See also release history.

License and distribution

SQLLine is distributed under the 3-clause BSD License, meaning that you are free to redistribute, modify, or sell it with almost no restrictions.

It is distributed via the Maven Central Repository.

Demos

demos

Quick start

If you have Coursier installed, you can quickly connect to a demo Hypersonic database with:

$ coursier launch sqlline:sqlline:1.12.0 org.hsqldb:hsqldb:2.5.0 net.hydromatic:foodmart-data-hsqldb:0.4 -M sqlline.SqlLine -- -u jdbc:hsqldb:res:foodmart -n FOODMART -p FOODMART -d org.hsqldb.jdbcDriver
0: jdbc:hsqldb:res:foodmart> select avg("shelf_height" * "shelf_width" * "shelf_depth") as "avg_volume" from "product";
+-------------------------+
|       avg_volume        |
+-------------------------+
| 2147.3845245442353      |
+-------------------------+
1 row selected (0.01 seconds)
0: jdbc:hsqldb:res:foodmart> !quit

Getting started

Copy the sqlline script (or sqlline.bat for Windows), sqlline-VERSION-jar-with-dependencies.jar and a JDBC driver jar into the same directory. (Or just put sqlline on your PATH.)

…

To get help:

bash
$ sqlline --help

If you prefer, you can invoke Java directly, without using the sqlline script:

bash
$ java -jar sqlline-VERSION-jar-with-dependencies.jar --help

Connecting using URLs

A URL (or connect string) is a string that specifies the location of your database, and perhaps credentials and other parameters specific to your database's JDBC driver. It always starts with 'jdbc:', usually followed by the machine name of the database and additional parameters.

For example, the following bash command connects to Apache Drill, assuming that Drill is installed in /opt/apache-drill-1.15.0:

bash
$ /opt/apache-drill-1.15.0/bin/sqlline -u "jdbc:drill:drillbit=example.com;auth=kerberos"

Because ';' is a command separator in bash, the URL is included in double-quotes ('"'). You will need to quote the URL and other arguments if they contain characters that are special in your shell; different shells have different special characters, but space (' '), dollar ('$'), single-quote ('''), bang ('!') and percent ('%') are some common examples.

Read the manual.

Maven Usage

Use the following definition to use sqlline in your maven project:

xml

  sqlline
  sqlline
  1.12.0

Building

To build or run SQLLine, you need Java 8 or higher. (When running on Java 15 and higher, you will need to set scriptEngine before you use promptscript.)

Check out and build:

bash
git clone git://github.com/julianhyde/sqlline.git
cd sqlline
./mvnw package

Committers

  • Arina Ielchiieva
  • Jack Hahn
  • Joe Posner
  • John Pham
  • John V. Sichi
  • Julian Hyde (PMC)
  • Marc Prud'hommeaux
  • Sergey Nuyanzin (PMC Chair)
  • Stephan Zuercher
  • Steve Herskovitz
  • Sunny Choi

More information

  • License: Modified BSD License
  • Home page
  • API
  • Source code
  • Developers list: sqlline-dev at googlegroups.com (archive, subscribe)
  • Twitter: @SQLLineShell
  • Issues
  • Release notes and history
  • HOWTO

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Java

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言