SQL and databases

Stage 1 · Lesson 6 of 8

The command-line client

Relational thinking and your setup

Learn the for your database alongside the graphical tool. It is psql for , mysql for MySQL and sqlcmd for . Practise the basics: connect with a host, user and database, list the tables, describe one table, run a script file and quit.

Servers, and usually have no graphical tool. Restoring a dump (a backup file) or running a migration by hand also happens in the terminal. Each client has its own shortcuts. psql uses backslash commands such as \dt, mysql uses SHOW and DESCRIBE, and sqlcmd runs a batch only when you type GO.

Common traplearning only the graphical tool, then freezing the first time you need to check something on a server over SSH (a remote terminal connection).

A question to check yourself, an AI practice session and 1 cheat sheet entry come with the full roadmap. Unlock

Resources for this stage

Start with· follow one of these

Keep handy

  • Install guides for Windows, Linux and containers, plus the sqlcmd and SSMS quickstarts

  • A one-page map of SQL topics: use it to see where each stage of this roadmap fits

Mark this stage as not done?