c와 mariadb 연결하는 방법 및 예제 3 - insert+update 한번에
Mariadb INSERT INTO csv_isstatement (codename, AsOfDate, Period, FiscalYearEnd, CurrencyId, ReportType, IsCalculated, csv_isstatement.20346) VALUES ('0C000006SP', '2000-12-31', '12M', '12', 'USD', 'A', '0', '2397284.000000') ON DUPLICATE KEY UPDATE csv_isstatement.20346 = 2397284.000000; key가 codename이고 중복된 데이터가 있다면 update를 해주는 쿼리이다.
2023. 1. 8.