In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
What are the basic statements of MySQL relational database? I believe many inexperienced people are at a loss about this. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.
Basic statement of MySQL Relational Database
Study with me. Let's go
Overview of SQL
Structured query language (Structured Query Language), referred to as SQL, is a special purpose programming language, a database query and programming language for accessing data and querying, updating and managing relational database systems, as well as an extension of database script files. From above, we can see that there are about two kinds of jobs related to our database: DBD and DBA.
1.dba is the database administrator database administrator
2.dbd is the database developer database developer
SQL statement structure
The structured query language consists of six parts:
1: data query language (DQL:Data Query Language):
Its statement, also known as a "data retrieval statement", is used to obtain data from a table and determine how the data is given in the application. The reserved word SELECT is the most frequently used verb in DQL (and all SQL). The other commonly used reserved words in DQL are WHERE,ORDER BY,GROUP BY and HAVING. These DQL reserved words are often used with other types of SQL statements.
Second, data manipulation language (DML:Data Manipulation Language):
Its sentences include verbs INSERT,UPDATE and DELETE. They are used to add, modify, and delete rows in the table, respectively. Also known as Action query language.
Transaction processing language (TPL): somewhat similar to shell as a whole consisting of multiple sql statements
Its statement ensures that all rows of the table affected by the DML statement are updated in a timely manner. TPL statements include BEGIN TRANSACTION,COMMIT and ROLLBACK.
Fourth, data control language (DCL):
Its statements are licensed through GRANT or REVOKE to determine the access of individual users and user groups to database objects. Some RDBMS can use GRANT or REVOKE to control access to individual columns of the form.
Fifth, data definition language (DDL):
Its sentences include verbs CREATE and DROP. Create a new table or delete a table (CREAT TABLE or DROP TABLE) in the database; add indexes to the table, and so on. DDL includes a number of reserved words related to obtaining data in the human database catalog. It is also part of the action query.
Six: pointer Control language (CCL):
Its statements, such as DECLARE CURSOR,FETCH INTO and UPDATE WHERE CURRENT, are used for separate operations on one or more forms.
Create a database
Syntax: create database database name
Considerations for creating a database:
1) in the file system, the datastore of MySQL will represent the MySQL database as a directory. Therefore, the database name in the above command must match the directory name of the operating system's constraints. For example,\, /,:, *,?, ", | these symbols are not allowed in file and directory names, and these letters are automatically deleted in the MySQL database name.
2) the name of the database cannot exceed 64 characters. Names containing special characters or names composed entirely of numbers or reserved words must be enclosed in single quotation marks ``.
3) the database cannot have the same name.
[root@laobing ~] # ls / usr/local/mysql/data/ # View the database storage directory
Mysql > drop database `laobing`; # Delete database laobing. There is no prompt for deletion, so proceed with caution.
After reading the above, have you mastered the basic sentences of MySQL relational database? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
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.