Загрузка функций и проекта "Нарушениям нет"
This commit is contained in:
11
Database/Функции/status_post.sql
Normal file
11
Database/Функции/status_post.sql
Normal file
@@ -0,0 +1,11 @@
|
||||
CREATE OR REPLACE FUNCTION nn_db.status_post(
|
||||
in_title nn_db.status.title%TYPE)
|
||||
RETURNS TABLE(pk_status nn_db.status.pk_status%TYPE)
|
||||
AS $$
|
||||
BEGIN
|
||||
INSERT INTO nn_db.status (title)
|
||||
VALUES (in_title);
|
||||
|
||||
RETURN QUERY SELECT MAX(nn_db.status.pk_status) FROM nn_db.status;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql
|
||||
Reference in New Issue
Block a user