Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. CREATE TABLE posts (
  2. id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
  3. title VARCHAR(50),
  4. body TEXT,
  5. created DATETIME DEFAULT NULL,
  6. modified DATETIME DEFAULT NULL
  7. );
  8.  
  9. INSERT INTO posts (title,body,created)
  10. VALUES (’The title’, ’This is the post body.’, NOW());
  11. INSERT INTO posts (title,body,created)
  12. VALUES (’A title once again’, ’And the post body follows.’, NOW());
  13. INSERT INTO posts (title,body,created)
  14. VALUES (’Title strikes back’, ’This is really exciting! Not.’, NOW());
  15.  
  16. #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'title’, ’This is the post body.’, NOW())' at line 2
  17.  
  18. INSERT INTO posts
  19. (
  20. title,body,created
  21. )
  22. VALUES
  23. (
  24. 'The title', 'This is the post body.', NOW()
  25. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement