Visualizzazione dei risultati da 1 a 2 su 2
  1. #1
    Utente di HTML.it L'avatar di Threepwood
    Registrato dal
    Feb 2003
    Messaggi
    2,107

    [SQL] UPDATE tra 2 tabelle

    Salve a tutti!

    come faccio x fare una UPDATE in sql tra 2 tabelle di questo tipo?

    codice:
    update tab1,tab2 set tab1.nome=tab2.nome where tab1.code=tab2.code
    thanks!
    Guybrush Threepwood

  2. #2
    codice:
    UPDATE 
      Tab2 INNER JOIN Tab1 ON Tab2.Code = Tab1.Code 
    SET 
      Tab1.Nome = Tab2.Nome

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.