SQL
Modified 2024-03-24
- Complete Intro to SQL | Build real-world apps with SQL using PostgreSQL | Fro...
- MySQL for Developers course: MySQL for Developers — PlanetScale
- Learn SQL In 30 Days Roadmap For FREE
- SQLBolt - Learn SQL - Introduction to SQL
- https://mode.com/sql-tutorial
PostgreSQL
docker pull postgres:14
docker run -e POSTGRES_PASSWORD=lol --name=pg --rm -d -p 5432:5432 postgres:14
docker exec -u postgres -it pg psql- you can only use single quote for values
'banana' - case insensitive, but good practice to keep the keywords in CAPITAL
- better to use
SELECT * FROM db WHERE id > 23 LIMIT 10;for paging through data than to useOFFSET 23 - try out built-in functions with
SELECT, such asSELECT LOWER('HI THERE');
Connectors
- nodejs
use
pg, because you rawdogging SQL feels nice and if you use properly is safely escaped