Horje
psql store procedure-return multiple table values Code Example
psql store procedure-return multiple table values
CREATE OR REPLACE FUNCTION get_production_deployment(appId integer)
  RETURNS TABLE(empId INTEGER, empName VARCHAR, designation VARCHAR) AS
$
BEGIN
 RETURN QUERY
 
 SELECT employee.id, employee.name, employee.designation
 FROM employee where employee.id = 
 (SELECT empId FROM prod_movement where prod_movement.appId = appId)

END; $
 
LANGUAGE plpgsql;
Source: pynative.com




Sql

Related
psql create usr Code Example psql create usr Code Example
test connection to sql server Code Example test connection to sql server Code Example
how to create a new db from dumb file mysql Code Example how to create a new db from dumb file mysql Code Example
ora 00001 error  catch plsql Code Example ora 00001 error catch plsql Code Example
check sql query executed wp Code Example check sql query executed wp Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7