skip to Main Content

Inner Join Help on PostgreSQL

I have the following database relationship and query for PostgreSQL below: create table gender( gender_id int primary key, gender char(10)) create table student( student_id int primary key, first_name char(50) not null, last_name char(50) not null, gender_id int not null, constraint…

VIEW QUESTION

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