X hits on this document

191 views

0 shares

0 downloads

0 comments

38 / 70

:on_duplicate_key_update

jerry = Animal.new :name => 'Jerry G',

                  :password => 'frenchfry'

jerry.save! :on_duplicate_key_update =>

           [:password, :updated_at]

INSERT INTO animals

(`name`, `updated_at`, `species_id`,

 `password`,`email`, `created_at`)

  VALUES('Jerry G', '2009-03-15 06:17:51', NULL,

         'frenchfry', NULL, '2009-03-15 06:17:51')

ON DUPLICATE KEY UPDATE

 `animals`.`password`=VALUES(`password`),

 `animals`.`updated_at`=VALUES(`updated_at`)

Document info
Document views191
Page views191
Page last viewedSat Dec 10 04:15:06 UTC 2016
Pages70
Paragraphs654
Words2352

Comments