In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you what is the use of SQL, I hope you will learn a lot after reading this article, let's discuss it together!
Sql (STructured Query Language) is a common language for managing all operations of a database. It is a database query and programming language that can be used to access data and to query, update and manage relational database systems. Different SQL commands can be used to manage different database functions. SQL is also an extension of the database file format.
What is SQL?
SQL (structured query language) is one of the important tools for programmers and a part of database management tools. Different vendors provide different databases. For Web applications, MSSQL,MySQL,MS Access is commonly used. Oracle database is popular among enterprise users. The combination of PHP and MySQL is arguably the most popular among current Web applications.
Scripts and SQL in the database
We first query the creation table to store our student records, and then we use the insert query to add a small number of records.
The SQL command is as follows:
Create a student table
CREATE TABLE student (id int (2) NOT NULL auto_increment, name varchar (50) NOT NULL default'', class varchar (10) NOT NULL default'', mark int (3) NOT NULL default'0, UNIQUE KEY id (id)) TYPE=MyISAM
We can see that there are three fields in the table. One is id, which is an automatic increment that takes a unique number each time a record is added to the table. The next field is the 50-length name, which is used to store the student name. Next is the 10-length class field, which represents the class field.
Add record
Add some data to the above table. The SQL statement to insert the data is as follows:
INSERT INTO student VALUES (1, 'John Deo',' Four', 75); INSERT INTO student VALUES (2, 'Max Ruin',' Three', 85); INSERT INTO student VALUES (3, 'Arnold',' Three', 55); INSERT INTO student VALUES (4, 'Krish Star',' Four', 60); INSERT INTO student VALUES (5, 'John Mike',' Four', 60); INSERT INTO student VALUES (6, 'Alex John',' Five', 55)
You can also copy and paste this SQL code in the SQL window to insert some records into the table.
This SQL code represents the insertion of six records into the student table. Then a simple SQL table has been successfully created.
After reading this article, I believe you have a certain understanding of the use of SQL, want to know more related knowledge, 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.