Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
新しいデータをtable1からtable2にコピーしようとしています。これ以外の方法でコーディングする方法がわかりません
INSERT table1 SELECT x.*,y.TIMESTAM FROM table1 x, table2y WHERE x.TIMESTAM > y.TIMESTAM;
タイムスタンプがtable2の行1よりも新しい(>)場合は、table1からすべての列をコピーしたい
新しいデータをすべてtable2からtable1にコピーする方法は次のとおりです。
INSERT INTO table1 SELECT * FROM table2 WHERE TIMESTAM > (select MAX(TIMESTAM) FROM table1);