Ajout de la section PostgreSQL (il y a prescription :D) #20

Merged
jf merged 2 commits from psql into main 2026-02-17 16:06:56 +01:00
2 changed files with 17 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
---
title: "PostgreSQL : Commandes et requêtes utiles"
author:
- JF
date: 2026-02-17
---
## Ne lister que les colonnes d'une table
```sql
\set TABLE_NAME 'ma_table'
SELECT column_name FROM information_schema.columns where table_name = :'TABLE_NAME';
```
Afficher toutes les tables et leur colonnes avec un début de nom de table :
```sql
SELECT table_name, column_name FROM information_schema.columns where table_name like debutnom%;
```

View File

@@ -24,6 +24,8 @@ nav:
- Linux:
- "Linux/2025-05-20-bash-life.md"
- "Linux/2019-07-09-manipulations-LVM.md"
- PostgreSQL:
- "PostgreSQL/2026-02-17-commandes-utiles.md"
- About: about.md
theme: readthedocs