In a single SQL query, insert a new user with a phone number and make sure phone number is unique.
Asked in the Technical Round 1 stage. Reported follow-ups included the benefits of UNIQUE and which data structure implements indexing.
user_id, full_name, and phone_number for the inserted user.| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Generated identifier for the user |
| full_name | VARCHAR(100) | User's full name |
| phone_number | VARCHAR(20) | User phone number with a UNIQUE constraint |