Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started