How to write pl sql in postgresql?



How to write pl sql in postgresql?..

Answer / Bhupendra Kumar

In PostgreSQL, PL/pgSQL is a procedural language that can be used for writing functions and procedures. Here's an example of a simple PL/pgSQL function:

```sql
CREATE OR REPLACE FUNCTION hello() RETURNS TEXT AS $$
BEGIN
RETURN 'Hello, World!';
END;
$$ LANGUAGE plpgsql;

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Postgre Interview Questions

How does db indexing work?

1 Answers  


What is the difference between sql and postgresql?

1 Answers  


Is postgresql secure?

1 Answers  


What is information_schema in postgresql?

1 Answers  


Where is pg_hba conf?

1 Answers  


Is postgresql better than sql server?

1 Answers  


This message is received in response to the query SELECT * FROM JA_Party. I would like to know what am I doing wrong. ERROR: relation "ja_party" does not exist LINE 1: SELECT * FROM JA_Party ^ ********** Error ********** ERROR: relation "ja_party" does not exist SQL state: 42P01 Character: 15

1 Answers  


What is a table catalog?

1 Answers  


What is shared buffer in postgres?

1 Answers  


What is connection pooling in postgresql?

1 Answers  


What is varchar in postgresql?

1 Answers  


What is sequence in postgresql?

1 Answers  


Categories