Making MySQL Function Example - Say Hello - Aliasing SQL Query

MySQL Stored Procedure & Function Example - Say Hello

open your SQL Query Editor then copy & paste the below code to make the Function to make a greeting inside a mysql function:

delimiter |
CREATE FUNCTION FN_SAY_HELLOW() RETURNS CHAR(128) 
RETURN 'Ya, i am saying hello!!! inside a MySQL function.'|

MySQL Stored Procedure & Function Example - Say Hello - SQL Query Editor Output

Again open your SQL Query Editor then copy & paste the below code to execute the Function to get the greetings Aliasing SQL Query:

   SELECT FN_SAY_HELLOW() AS Greetings;

MySQL Stored Procedure Example - Executing Stored Procedure - SQL Query Editor Output

 

Related Tutorial Examples

  1. MySQL Stored Procedure: Variable Example
  2. How To Find MySQL SERVER VERSION Information
  3. MySQL Stored Procedure: INSERT INTO SELECT... Example
  4. MySQL Stored Procedure: CREATE TABLE SELECT... Example
  5. MySQL Stored Procedure Function: How to Drop a Function Example
  6. MySQL Stored Procedure Function: How to Drop a Stored Procedure Example
  7. MySQL Stored Procedure: Creating Table using Stored Procedure Example
  8. Operator precedence in SQL Command MySQL Example
  9. Arithmetic operators in SQL Command MySQL Example
  10. Describe Table Structure using SQL Command MySQL Example

No comments:

Post a Comment

leave your comments here..