MySQL : How update record if exists else insert record? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

MySQL : How update record if exists else insert record?

1.all column needed are in same table 2. column are (person_id, telephone_type, telephone_number) 3. table name = phonebook 4. update required match (person_ id, telephone_type) 5. insert required (person_ id, telephone_type, telephone_number) Any suggestion / answers . Thanks for helping $)

9th Jun 2017, 12:36 PM
WEN HAN KHO
WEN HAN KHO - avatar
2 Answers
+ 2
@Serena how do i check record is exixsted before update. if not existed then, insert the record.
9th Jun 2017, 1:14 PM
WEN HAN KHO
WEN HAN KHO - avatar
+ 1
all column are varchar type
9th Jun 2017, 1:08 PM
WEN HAN KHO
WEN HAN KHO - avatar