You want to update the last modified timestamp in the orders table. The correct way to do this in a PL/pgSQL function, when the parameter integer order_id is passed, would be:
Correct Answer:
DECLARE
order_id ALIAS FOR $1;
mytimestamp timestamp;
BEGIN
mytimestamp := ''now'';
UPDATE orders SET orderid=order_id, lastmodified = mytimestamp;
RETURN mytimestamp;
END;
' LANGUAGE 'plpgsql';
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More PostgreSQL MCQ Questions