Question: Correct the query CREATE OR REPLACE FUNCTION EMPLOYEE_AFTER_1968() returns bigint as $date$ declare birthdate bigint; BEGIN SELECT birthdate FROM EMPLOYEE WHERE BIRTHDATE >= DATE('1968-01-01', '00:00:00');

Correct the query

Correct the query CREATE OR REPLACE FUNCTION EMPLOYEE_AFTER_1968() returns bigint as $date$

CREATE OR REPLACE FUNCTION EMPLOYEE_AFTER_1968() returns bigint as $date$ declare birthdate bigint; BEGIN SELECT birthdate FROM EMPLOYEE WHERE BIRTHDATE >= DATE('1968-01-01', '00:00:00'); return date; END; $date$ language plpgsql

Message SQL Error [42702]: ERROR: column reference "birthdate" A is ambiguous Detail: It could refer to either a PL/pgSQL variable or a table column.1 Where: PL/pgSQL function employee_after_19680 line 4 at SQL statement

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!