MySQLでreplace intoの使い方

形式:
1. replace into table_name(col_name, …) values(…)
2. replace into table_name(col_name, …) select …
3. replace into table_name set col_name=value, …

操作:
1.replace into startnews24(id,title) values(1,’青森で震度5弱’)
//idがprimary keyの場合、update操作

2.eplace into startnews24(title,content) values('女性の活躍推進’,’安倍晋三首相が9月上旬に行う内閣改造’) //insert操作

MySQL

Posted by arkgame