Created
September 17, 2015 11:00
-
-
Save bennadel/0beb0bc04bcae9f077dc to your computer and use it in GitHub Desktop.
Using The INSERT INTO ... SET Syntax In MySQL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Create a new friend record. | |
INSERT INTO | |
friend | |
SET | |
name = 'Kim', | |
isBFF = true, | |
updatedAt = UTC_TIMESTAMP() | |
; | |
-- Return the newly-generated primary-key. | |
SELECT | |
( @@Identity ) AS id | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment