I've wik开发者_高级运维i'd SQL/PSM and I know it stands for Structured Query Language/Pesistent Stored Modules. I'd like to know what it really is and how it differs from T-SQL and any other versions of SQL?
SQL-PSM is an ISO standard like SQL. But since SQL does not have procedural capabilities, SQL-PSM came in to extend SQL to define those capabilities.
There is a wikipedia entry for SQL-PSM.
There are many commercial databases which implement this standard. IBM DB2, MySQL and PostgreSQL e.t.c. Taken from wikipedia entry for SQL.
I think... PSM is just a generic term for "Stored Procedure" in TSQL.
A stored procedure is basically just a bunch of TSQL (can be as simple as a single SELECT statement, or as complicated as you please) that can take parameters, execute DML / DDL / and other operations, and report on it's final status (success or failure) that gets compiled into a single execution plan.
Also known a Stored Procedure or just 'Procedure' in PL/SQL -- it's basically the same thing there.
SQLlite doesn't have stored prodecures...
Persistent Stored Modules exist in many different database technologies. Their interfaces are different and the actual declarations and out can be different as well. But in general, it is a way of keeping SQL programming code & logic bundled at the SQL server level.
精彩评论