![]() To call a stored procedure with parameters: c Is the output result set:Assign values to variables Each in the stored procedure body SQL A semicolon is required at the end of the statementĬase: sum two numbers (two int - > in and one out type parameter) create procedure pro1_sum(in a int,in b int,out c int) If there is only one statement in the stored procedure, begin and end It can be omittedģ. Inout: This parameter can be used as input or output, that is, it needs to be passed in or returnedĢ. ![]() Out: This parameter can be used as output, that is, it can be used as return value In:This parameter can be used as input, that is, it needs to be inserted when calling the stored procedure Parameter list: parameter model Parameter name Parameter type Stored procedure body (a group) SQL Statement)ġ. The compilation times are reduced and the connection times with the database server are reduced, which improves the efficiency Create syntax:Ĭreate procedure Stored procedure name() Meaning: a set of pre changed SQL statements, which can be used to understand batch processing statementsģ. Including grouping function, group by, having and de duplication 2. View create view Only saved SQL logic Mainly for query (data can be modified, data cannot be added or deleted) Surface create table Data maintained Add, delete, modify and check After 1, the characteristics appear through the data of dynamic production Syntax:Ĭreate syntax Does it actually occupy physical space use Meaning: virtual table, but it is the same as that of ordinary table MySQL view, stored procedure, variable, function, transaction 1.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |