informatique:sql
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| informatique:sql [02/10/2024 10:57] – [Supprimer doublons] cyrille | informatique:sql [24/08/2025 09:12] (Version actuelle) – [Manipulons ce qui n'est pas] cyrille | ||
|---|---|---|---|
| Ligne 24: | Ligne 24: | ||
| * [[https:// | * [[https:// | ||
| * [[https:// | * [[https:// | ||
| + | |||
| + | Et pour un '' | ||
| + | |||
| + | <code sql> | ||
| + | UPDATE `table_a` a | ||
| + | LEFT JOIN `table_b` b ON a.id = b.id | ||
| + | SET a.password = ' | ||
| + | WHERE b.id = 195812 | ||
| + | </ | ||
| ==== Données Hiérarchiques (Nested Categories) ==== | ==== Données Hiérarchiques (Nested Categories) ==== | ||
| Ligne 104: | Ligne 113: | ||
| WHERE m.station_id IS NULL | WHERE m.station_id IS NULL | ||
| ORDER BY s.id, dates.measured_at; | ORDER BY s.id, dates.measured_at; | ||
| + | </ | ||
| + | |||
| + | ** Question ** | ||
| + | |||
| + | Dans la bdd de [[https:// | ||
| + | |||
| + | Et contourner l' | ||
| + | |||
| + | ** Réponse ** | ||
| + | |||
| + | <code sql> | ||
| + | delete T1 FROM subscriber_table as T1 join ( | ||
| + | | ||
| + | left join list_table lt on lt.name_list = st.list_subscriber | ||
| + | where lt.name_list is null | ||
| + | group by st.list_subscriber | ||
| + | ) as T2 on T2.list_subscriber = T1.list_subscriber ; | ||
| </ | </ | ||
| Ligne 170: | Ligne 196: | ||
| <code sql> | <code sql> | ||
| - | DELETE m , p FROM wp2r_posts p INNER JOIN wp2r_postmeta m | + | DELETE m , p |
| - | WHERE m.post_id= p.ID and p.post_type=" | + | FROM wp2r_posts p INNER JOIN wp2r_postmeta m |
| + | WHERE m.post_id= p.ID | ||
| + | and p.post_type=" | ||
| </ | </ | ||
informatique/sql.1727859452.txt.gz · Dernière modification : de cyrille
