In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
Today, I will talk to you about how to manage stored procedures in MYSQL. Many people may not know much about it. In order to make you understand better, the editor has summarized the following for you. I hope you can get something according to this article.
View the stored procedure function name:
Stored procedure: (notice that the field name,type is flanked by the key under ESC)
Select `name` from mysql.proc where db = 'your_db_name' and `type` =' PROCEDURE'
Show procedure status
Function:
Select `name` from mysql.proc where db = 'your_db_name' and `type` =' FUNCTION'
Show function status
View stored procedures and function codes:
Show create procedure proc_name
Show create function func_name
View the view:
SELECT * from information_schema.VIEWS
View the table:
SELECT * from information_schema.TABLES / / Table
View triggers:
Method 1:
Syntax: SHOW TRIGGERS [FROM db_name] [LIKE expr]
Example: SHOW TRIGGERSG / / trigger
Method 2:
Query the TRIGGERS table in INFORMATION_SCHEMA database
Mysql > SELECT * FROM triggers T WHERE trigger_name= "mytrigger" G
So, modify or recompile a stored procedure as follows:
Select `name` from mysql.proc
Tee c:1.txt
Show create procedure procedure_name G
Notee
Drop procedure procedure_name
Delimiter / /
Create procedure .
/ /
Delimiter
Select `name` from mysql.proc
Show create procedure procedure_name G
[@ more@]
Mysql > help
For information about MySQL products and services, visit:
Http://www.mysql.com/
For developer information, including the MySQL Reference Manual, visit:
Http://dev.mysql.com/
To buy MySQL Enterprise support, training, or other products, visit:
Https://shop.mysql.com/
List of all MySQL commands:
Note that all text commands must be first on line and end with';'
?) Synonym for `help'.
Clear (c) Clear the current input statement.
Connect (r) Reconnect to the server. Optional arguments are db and host.
Delimiter (d) Set statement delimiter.
Ego (G) Send command to mysql server, display result vertically.
Exit (Q) Exit mysql. Same as quit.
Go (g) Send command to mysql server.
Help (h) Display this help.
Notee (t) Don't write into outfile.
Print (p) Print current command.
Prompt (R) Change your mysql prompt.
Quit (Q) Quit mysql.
Rehash (#) Rebuild completion hash.
Source (.) Execute an SQL script file. Takes a file name as an argument.
Status (s) Get status information from the server.
Tee (T) Set outfile [to_outfile]. Append everything into given outfile.
Use (u) Use another database. Takes database name as argument.
Charset (C) Switch to another charset. Might be needed for processing binlog
With multi-byte charsets.
Warnings (W) Show warnings after every statement.
Nowarning (w) Don't show warnings after every statement.
For server side help, type 'help contents'
After reading the above, do you have any further understanding of how to manage stored procedures in MYSQL? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.