Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

What Is A Database And How Do I Use It

Authors: Matt Anniss

1st Edition

1622750799, 978-1622750795

More Books

Students also viewed these Databases questions

Question

=+2 Is the decision sustainable in the long run?

Answered: 1 week ago

Question

=+1 Is the decision fair to employees?

Answered: 1 week ago