Advertisement
kalin729

INSERTS

Nov 17th, 2024
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 2.19 KB | None | 0 0
  1. -- Insert Users
  2. INSERT INTO Users (name, email, date_of_birth)
  3. VALUES
  4. ('Alice', 'alice@example.com', '1995-06-15'),
  5. ('Bob', 'bob@example.com', '1992-04-23'),
  6. ('Charlie', 'charlie@example.com', '1990-12-01'),
  7. ('Diana', 'diana@example.com', '1985-09-12'),
  8. ('Eve', 'eve@example.com', '2000-01-05');
  9.  
  10. INSERT INTO Users (name, email, date_of_birth)
  11. VALUES
  12. ('Frank', 'frank@example.com', '1993-03-21'),
  13. ('Grace', 'grace@example.com', '1997-07-30'),
  14. ('Hank', 'hank@example.com', '1989-11-15'),
  15. ('Ivy', 'ivy@example.com', '1998-02-10'),
  16. ('Jack', 'jack@example.com', '1994-05-25');
  17.  
  18.  
  19. -- Insert Friendships
  20. INSERT INTO Friendships (user_id, friend_id, status)
  21. VALUES
  22. (1, 2, 'accepted'),
  23. (1, 3, 'accepted'),
  24. (2, 3, 'accepted'),
  25. (4, 5, 'pending');
  26.  
  27. INSERT INTO Friendships (user_id, friend_id, status)
  28. VALUES
  29. (1, 6, 'accepted'),
  30. (2, 7, 'accepted'),
  31. (3, 8, 'accepted'),
  32. (4, 9, 'accepted'),
  33. (5, 10, 'pending');
  34.  
  35.  
  36. -- Insert Posts
  37. INSERT INTO Posts (user_id, content)
  38. VALUES
  39. (1, 'Alice’s first post!'),
  40. (2, 'Bob’s exciting announcement'),
  41. (3, 'Charlie’s thoughts on life'),
  42. (1, 'Alice’s second post.'),
  43. (5, 'Eve is new here!');
  44.  
  45. INSERT INTO Posts (user_id, content)
  46. VALUES
  47. (6, 'Frank’s journey into SQL development.'),
  48. (7, 'Grace shares her SQL project tips.'),
  49. (8, 'Hank is learning about database optimization!'),
  50. (9, 'Ivy: SQL is the backbone of modern apps!'),
  51. (10, 'Jack’s first post about normalization.');
  52.  
  53.  
  54. -- Insert Comments
  55. INSERT INTO Comments (post_id, user_id, content)
  56. VALUES
  57. (1, 2, 'Great post, Alice!'),
  58. (2, 3, 'Congratulations, Bob!'),
  59. (3, 1, 'Nice one, Charlie!'),
  60. (4, 5, 'Thanks for sharing, Alice.');
  61.  
  62. INSERT INTO Comments (post_id, user_id, content)
  63. VALUES
  64. (6, 7, 'This is inspiring, Frank!'),
  65. (7, 8, 'Thanks for the tips, Grace.'),
  66. (8, 9, 'I agree, database optimization is key!'),
  67. (9, 10, 'Well said, Ivy.'),
  68. (10, 6, 'Normalization is crucial, Jack!');
  69.  
  70.  
  71. -- Insert Likes
  72. INSERT INTO Likes (post_id, user_id)
  73. VALUES
  74. (1, 2),
  75. (1, 3),
  76. (2, 1),
  77. (3, 4),
  78. (5, 1);
  79.  
  80. INSERT INTO Likes (post_id, user_id)
  81. VALUES
  82. (6, 7),
  83. (7, 8),
  84. (8, 9),
  85. (9, 10),
  86. (10, 6);
  87.  
  88. INSERT INTO Likes (comment_id, user_id)
  89. VALUES
  90. (6, 3),
  91. (7, 5),
  92. (8, 6),
  93. (9, 2),
  94. (9, 9);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement