PL/pgsql (Procedural Language/PostgreSQL Structured Query Language) implements PostgreSQL ordbms when there are too many other statements. The syntax of Oracle Database contains PL/SQL statements, which is similar to linear regression.
More
Http://www.postgresonline.com/journal/archives/201-Using-RETURNS-TABLE-vs.-OUT-parameters.html--http://www.postgresonline.com/journal/archives/201-using-returns-table-vs.-out-parameters.html--ver:9.3 Geovin Du Tu--returning a single record using SQL
1. Return statementThere are three commands that can be used to return data from a function:
RETURN
RETURN NEXT
RETURN QUERY
2. Return command syntax:RETURN RETURN expression;If you do not use the expression return command to
Symfoware Open System"DDL" (data definition Language)A data definition language that defines and manages the language of all objects in a SQL database. The main commands are create, alter, DROP, etc., the DDL is mainly used in the initialization of
Author: icyriverSource: http://icyriver.net /? P = 176
PL/ProxyAndPostgreSQLThe structure relationship of the cluster can be clearly expressed. If you are not familiar with pL/proxy and PostgreSQL clusters, you can seeSkype plans for
PostgreSQL Stored Procedure return dataset instance
Here we use an instance to demonstrate how to return a dataset from a PostgreSQL stored procedure.
1. Prepare the data table first.
// Member_categoryCreate table member_category (id serial, name
Here is an example to illustrate how the PostgreSQL stored procedure returns a dataset.
1. Prepare data table First
Copy Code code as follows:
Member_category
CREATE TABLE Member_category (ID serial, name text, Discount_rate real,
N-more SQL statements, but their own time, but everywhere is the pit ah, ah, ah!!!!!!!!!!!!!!!Want to write a get the latest ID value in the table.On the CodeCREATE TABLEDepartment (IDINT PRIMARY KEY not NULL, D_codeVARCHAR(
The time can be added and reduced directly in PostgreSQL: Query System Current Time: Select Now ();OrSelect Current_timestamp; SELECT now ():: Timestamp + ' 1 year '; --Current time plus 1 yearsSELECT now ():: Timestamp + ' 1 month '; --Current
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.