Use the mysql. proc table to obtain basic data information

Source: Internet
Author: User
No details: MySQLmysqlmysqlmysqlDELIMITERmysqlmysqlCREATEFUNCTIONmyFunction (item_sumDECIMAL ))

No details about MySQL mysqlmysqlmysql DELIMITER // mysqlmysql create function myFunction (item_sum DECIMAL (10, 2)-returns decimal (10, 1)-BEGIN---return round (item_sum, 1 ); --END-// Query OK, 0 rows affected (0.00 sec) mysql DELIMITER; mys

<无详细内容> MySQL
mysql>mysql>mysql> DELIMITER //mysql>mysql> CREATE FUNCTION myFunction (item_sum DECIMAL(10,2))    -> RETURNS DECIMAL(10,1)    -> BEGIN    ->    ->    -> RETURN ROUND(item_sum,1);    ->    -> END    -> //Query OK, 0 rows affected (0.00 sec)mysql> DELIMITER ;mysql>mysql> select myFunction(123.12);+--------------------+| myFunction(123.12) |+--------------------+|              123.1 |+--------------------+1 row in set (0.00 sec)mysql>mysql>mysql>mysql> SELECT * FROM mysql.proc WHERE name = 'myFunction'\G*************************** 1. row ***************************              db: test            name: myFunction            type: FUNCTION   specific_name: myFunction        language: SQL sql_data_access: CONTAINS_SQLis_deterministic: NO   security_type: DEFINER      param_list: item_sum DECIMAL(10,2)         returns: decimal(10,1)            body: BEGINRETURN ROUND(item_sum,1);END         definer: root@localhost         created: 2007-07-23 18:58:39        modified: 2007-07-23 18:58:39        sql_mode:         comment:1 row in set (0.00 sec)mysql>mysql> drop function myFunction;Query OK, 0 rows affected (0.00 sec)mysql>mysql>

Contact Us

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: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.