Getting around in SQL

On Thursday evening, I'll be taking part in another egghead.io workshop. This time the workshop will be delivered by Tyler Clark and will be on Advanced SQL (there is still time to sign up here).

In preparation, I watched Tyler's first course on SQL that is hosted on egghead. It was really interesting and, though I knew most of it, I appreciated the clarity and focused nature of Tyler's delivery.

Almost all of my experience with SQL has been with MySQL. Tyler delivers his course using PostgreSQL which is almost entirely new to me. I realised that while a lot of the syntax is the same between the two implementations, there are some basic differences when it comes to navigation between databases and tables.

I put together a quick screencast to show these and I thought I'd share the screencast and a summary table.

youtube:https://www.youtube.com/watch?v=dD_omqx1H_I

IntentionMySQLPostgreSQL
List databasesSHOW DATABASES;\l
Connect to databaseUSE <db_name>\c <db_name>
List tables in databaseSHOW TABLES\dt
List rows in tableSELECT * FROM <table_name>SELECT * FROM <table_name>
Published 10 Feb 2020

Webmentions

No likes or reposts yet.


The conversation continues ...

No conversation yet.


Sign up for my newsletter

I'll not overload your inbox!

Freelance web-developer, building interesting things on the web. Based in Brighton.
Kevin Cunningham on Twitter