How to implement "SELECT INTO" in Oracle with PostgreSQL commands?
0
votes
2
answers
515
views
I have seen many explanations about
SELECT INTO
in the oracle clause. I found a difference in applying SELECT INTO
in Oracle and other SQL databases. In Oracle, the SELECT INTO
statement retrieves values from one or more database tables (as the SQL SELECT
statement does) and stores them in variables (which the SQL SELECT
statement does not do). Whereas in Postgres, SELECT INTO
creates a new table from the results of a query.
I want to apply/implement such a thing in Postgres. What is the appropriate command or statement there?
Here is my Oracle query:
SELECT COUNT(1)
INTO ada
FROM atk_history_qty
WHERE tgl BETWEEN TO_DATE ('2014/02/01', 'yyyy/mm/dd')
AND TO_DATE ('2014/02/28', 'yyyy/mm/dd');
Asked by devins10
(1 rep)
Jan 17, 2023, 09:06 AM
Last activity: Jan 17, 2023, 10:58 AM
Last activity: Jan 17, 2023, 10:58 AM