Visualizzazione dei risultati da 1 a 4 su 4
  1. #1

    [mysql] update con join

    Devo fare un update con join su mysql v.3.23.49 però non mi funge.

    Su un forum si dice un utente dice
    "mysql does not support update (or delete) queries using joins.
    Apparently this is on the todo list for version 4.x"

    ma .. non mi risulta.. sul manuale c'è :
    "Note that INNER JOIN syntax allows a join_condition only from MySQL 3.23.17 on. The same is true for JOIN and CROSS JOIN only as of MySQL 4.0.11. "

    ??

    [°_°] The Web Styler Project [°_°]
    :.:Classifica Spettacolare :.:
    :-:Partecipa :-: GUADAGNA SCRIVENDO ARTICOLI !! fino a 2,5 crediti per parola

  2. #2
    ehm...

    1° non è assolutamente sql standard
    2° le join su delete e update sono supportate SOLO su mysql 4 e superiori, mentre le insert li supportano a partire dalla 3.23.17


    al max, ma non so se va, puoi provare...

    UPDATE FROM tabella1 AS tbl1, tabella2 AS tbl2 SET tbl1.field = '123', tbl2.field = '456' WHERE tbl1.id = tbl2.id AND tbl1.id = XYZ

    prova...ma non so se va
    The fastest Redis alternative ... cachegrand! https://github.com/danielealbano/cachegrand

  3. #3
    Originariamente inviato da daniele_dll
    ehm...

    1° non è assolutamente sql standard
    2° le join su delete e update sono supportate SOLO su mysql 4 e superiori, mentre le insert li supportano a partire dalla 3.23.17


    al max, ma non so se va, puoi provare...

    UPDATE FROM tabella1 AS tbl1, tabella2 AS tbl2 SET tbl1.field = '123', tbl2.field = '456' WHERE tbl1.id = tbl2.id AND tbl1.id = XYZ

    prova...ma non so se va
    avevo già provato... non funzia
    thks
    [°_°] The Web Styler Project [°_°]
    :.:Classifica Spettacolare :.:
    :-:Partecipa :-: GUADAGNA SCRIVENDO ARTICOLI !! fino a 2,5 crediti per parola

  4. #4
    Originariamente inviato da webstyler
    avevo già provato... non funzia
    thks
    allora, molto semplicemente, non si può
    The fastest Redis alternative ... cachegrand! https://github.com/danielealbano/cachegrand

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.