Skip to content

Latest commit

 

History

History
22 lines (16 loc) · 630 Bytes

register_for_the_party_sql_for_beginners_№3.md

File metadata and controls

22 lines (16 loc) · 630 Bytes

Description

You received an invitation to an amazing party. Now you need to write an insert statement to add yourself to the table of participants.

participants table schema

  • name (string)
  • age (integer)
  • attending (boolean)

NOTES:

  • Since alcohol will be served, you can only attend if you are 21 or older
  • You can't attend if the attending column returns anything but true

My Solution

INSERT INTO participants (name, age, attending)
VALUES ("Participant", 33, 'TRUE');
SELECT * FROM participants;