Difference between revisions of "MySQL"

Jump to navigation Jump to search
m (→‎Data Types: Minor format)
m (→‎Insert / Update Rows: Added Syntax Highlight)
Line 46: Line 46:


== Insert / Update Rows ==
== Insert / Update Rows ==
* <code> INSERT INTO hosts (name, ping_ok) VALUES ('ServerA', 1) ON DUPLICATE KEY UPDATE ping_ok=1; </code>
<source lang="mysql">INSERT INTO hosts (name, ping_ok) VALUES ('ServerA', 1) ON DUPLICATE KEY UPDATE ping_ok=1;
* <code> UPDATE hosts SET ping_ok=0, reason='Time Out' WHERE name='ServerA'; </code>
UPDATE hosts SET ping_ok=0, reason='Time Out' WHERE name='ServerA'; </source>
 


== Software Packages ==
== Software Packages ==