SQLSH(1)

πŸ“¦
version 1.18 Β· 3 versions
, in fedora 43

πŸ’… SQLSH(1) β€” the sqlsh page, bestie edition

okay so real talk: this is sqlsh(1), from the User Contributed Perl Documentation section of the manual. it's giving "interactive SQL shell" and honestly? iconic. let's go 🫢


✨ NAME ✨

sqlsh β€” SQL shell. that's it, that's the name, short and slay πŸ’…


🌸 SYNOPSIS 🌸

sqlsh -d DBI:Oracle:DEVDB -u scott -p tiger

look at her go. that's the whole vibe. one line, four flags, we're in. ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

so sqlsh is an interactive shell you run from the command-line to hang out with databases. bestie it's literally a whole little world where you type stuff at a prompt and the database answers back. 🌈

quick heads up: this page right here is the terse summary β€” the "for quick reference" version. if you want the full, deluxe, director's-cut description, go read SQL::Shell::Manual. no cap.

and if you wanna see the full list of commands? type this at the prompt after you run sqlsh:

help

periodt. πŸ’–

okay and here's a little thing that trips people up: if you pass a username with -u but you don't pass a password with -p, sqlsh will prompt you for the password itself. it's very polite like that. πŸ™ˆ and if you actually need a blank password (yes really, it happens), you can pass -p followed by nothing at all. just -p, vibes, and emptiness. πŸ’€


✨ OPTIONS ✨

one bullet per flag, no skipping, we don't do that here:

  • -d <DSN> β€” the DSN, aka the whole "where is this database and who is she" address πŸŽ€
  • -u <username> β€” your username, your identity, your main character energy πŸ‘‘
  • -p <password> β€” your password. if you leave it off after -u, you'll get prompted. if you want it blank, just pass -p with nothing after it 🫢
  • -i β€” read list of commands from STDIN πŸ“₯
  • -q β€” quiet mode: no banner. stealth mode activated πŸŒ™
  • -A β€” turn AutoCommit ON. she commits immediately, no hesitation, no second thoughts ⚑
  • -H β€” help πŸ’œ

🧚 COMMANDS ADDED BY SQLSH 🧚

these are the extra little cuties sqlsh sprinkles on top of your regular database life:

  • cat|more|less <file> β€” display file πŸ“„
  • help|? β€” show this ❓
  • reload β€” reload the shell πŸ”„
  • exit|quit|bye|\w+ off β€” quit the shell πŸ‘‹

look at exit|quit|bye|\w+ off β€” she has SO many ways to leave the party and every single one of them is valid. queen behavior honestly. πŸ’…


πŸŽ€ READLINE MODE πŸŽ€

okay so this script uses Term::Readline. and Term::Readline decides your editing mode β€” vi or emacs β€” based on the user's .inputrc, or on the $EDITOR environment variable. 🌸

here's the extra bit: this script will set $EDITOR based on $PERL_READLINE_MODE, or on bash's $SHELLOPTS variable. 🌈

but β€” and this is important bestie β€” any .inputrc "editing-mode" declaration still takes precedence. she said "I don't care what the script wants, .inputrc said it first." πŸ’€βœ¨


⭐ VERSION ⭐

Version 1.18 πŸ’–


πŸ‘‘ AUTHOR πŸ‘‘

John Alden with contributions by Simon Flack and Simon Stevenson <cpan _at_ bbc _dot_ co _dot_ uk> 🫢

Miguel Gualdron, maintainer. 🌟


SQL-Shell:  Interactive shell for DBI Databases
Copyright (C) 2006  BBC
Copyright (C) 2019  Miguel Gualdron

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
also see the file COPYING in this distribution, or hit up https://www.gnu.org/licenses/gpl-2.0.html 🌈

and that's the whole page, bestie!! this one's from perl v5.42.0, dated 2025-12-05, and it's page SQLSH(1). mwah, go forth and query responsibly πŸ’–βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from