Merge pull request 'Ajout de la section PostgreSQL (il y a prescription :D)' (#20) from psql into main
All checks were successful
continuous-integration/drone/push Build is passing

Reviewed-on: #20
This commit was merged in pull request #20.
This commit is contained in:
jf
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:
- "Linux/2025-05-20-bash-life.md" - "Linux/2025-05-20-bash-life.md"
- "Linux/2019-07-09-manipulations-LVM.md" - "Linux/2019-07-09-manipulations-LVM.md"
- PostgreSQL:
- "PostgreSQL/2026-02-17-commandes-utiles.md"
- About: about.md - About: about.md
theme: readthedocs theme: readthedocs