Skip to content

Instantly share code, notes, and snippets.

@Musab-Al-omari
Musab-Al-omari / postgres-cheatsheet.md
Created April 5, 2021 13:19 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
let firstQ=prompt("welcome in the website,great website for websiting processing,if you want to continue type any thing")
alert("so you type what you type , you are genius,")
console.log('Typing question=',firstQ)
let secondQ=prompt("ok now type number bigger than 1 and less than 3")
alert("its 2")
console.log('hard qeustion=',secondQ)
let thirdQ=prompt("now am the genius XD, the next part is to type your favorite color")
alert("its red ,easy peasy lemon squeezy")
console.log('coler question=',thirdQ)
let forthQ=prompt("You have reached the final boss ohh i mean part, what is the sluotion for (2x=2)? think carfully its hard one , you have 2 days to answer ")
<!DOCTYPE html>
<html>
<head>
<title>The website</title>
<style>
p1 {color: lawngreen;}
p2{color: lightcoral;}
p3 {color: lightseagreen;}
p4 {color: magenta;}
ol {font-size: 40px;}