Home > database >  PGSQL create functions
PGSQL create functions

Time:12-10

You need to create a function
Please see the following code where need to modify the
Most of the parameters has a lot of problems if you have better of information for learning
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
 
The CREATE OR REPLACE FUNCTION daily_update_order ()
RETURNS the record AS $body $
Declare
Record
The BEGIN
DROP TABLE IF the EXISTS the order;
The CREATE TABLE order AS
Select
A.o rder_id,
Anderson tem_name,
B.i tem_no
The from order1 a left join order2 b on a.o rder_no=b.o rder_no
The create index index_order1 on order (order_id);
END;
$body $
LANGUAGE PLPGSQL;
  • Related