skip to Main Content

Insert Substrings in Each Row on PostgreSQL

create table phone_log(phone_number CHAR(20) NOT NULL, area_code CHAR(10)); INSERT INTO phone_log(phone_number) VALUES ('310-430-9201'); INSERT INTO phone_log(phone_number) VALUES ('917-829-2876'); INSERT INTO phone_log(phone_number) VALUES ('424-917-1055') How do I insert the area code of each phone number using the SUBSTRING FUNCTION for each…

VIEW QUESTION
Back To Top
Search