MySQL Stored Procedure Example - Creating Table
open your SQL Query Editor then copy & paste the below code to make the Stored Procedure to create a test table:
delimiter |
CREATE PROCEDURE SP_CREATE_TABLE_TEST ()
BEGIN
CREATE TABLE TEST
(
TestID int(11) default NULL,
TestName varchar(100) default NULL
)
ENGINE=InnoDB DEFAULT CHARSET=utf8;
END;
|
MySQL Stored Procedure Example - Creating Table - SQL Query Editor Output
Again open your SQL Query Editor then copy & paste the below code to execute the Stored Procedure:
CALL SP_CREATE_TABLE_TEST;
MySQL Stored Procedure Example - Executing Stored Procedure - SQL Query Editor Output
Related Tutorial Examples
- MySQL Stored Procedure Function: Making hello world Function using aliase Example
- MySQL Stored Procedure: Variable Example
- MySQL Stored Procedure: Batch Salary Increment Example
- MSSQL PRINT Like Function in MySQL Example
- MySQL TRUNCATE TABLE Example
- MySQL IF() Nested Function Example
- 20 steps to make CakePHP Blog Project
- step 2: download cakephp and setup cakeblog
- step 11: admin view posts for cakephp blog
- PERL Example: Use of Multidimentional Array in PERL


No comments:
Post a Comment
leave your comments here..