当前位置:网站首页>Common database statements in unity
Common database statements in unity
2022-07-05 04:52:00 【yaohuiyaoo】
1. Create database
create database Database name ;
2. View all databases
show databases;
3. Use ( Get into ) database
use Database name ;
4. Delete database
drop database Database name ;
5. View all tables in the current database
show tables;
6. Delete a table
drop table Table name ;
7. Insert data into the table
insert into Table name ( Field )value( Corresponding type data );
8. Update data that meets the conditions
update Table name set Field name = data where Field = data
Be careful :where The latter is the condition , Satisfy where The following data can be modified to where The previous data
9. Delete data
delete from Table name where Field = data ;
10. Look up all the data in the table
select * from Table name
11. Query the data of some fields in the table
select Field 1, Field 2 from Table name ;
12. Query some fields in the table that meet the conditions
select Field 1, Field 2 from Table name where Field = data
13. Query a field that is not empty
select *from Table name where Field is null;
14. Several fields can be found and one field is not empty
select Field 1, Field 2 from Table name where Field is null;
15 Query the data starting with a word
select * from Table name where Field like ’ word %‘;
16. You can find out if you meet one condition
select * from Table name where Field = data or Field = data ;
17. Query data that meets multiple conditions at the same time
select *from Table name where Field = data and Field = data ;
18. Query data in a certain interval
select * from Table name where Field between data and data
19. Query to remove duplicate data
select distinct( Field ) from Table name where Field = data
20. In ascending order of a certain data
select * from Table name order by Field
21. Multi column sorting : When the first data is the same, sort according to the second requirement
select *from Table name order by Field desc , Field asc;
22. Limited number of queries
select * from Table name limit 0,3
23. Query data ( Internal connection )
select Field , Field from Table name inner join Table name on Primary key = Foreign keys ;
24 The cartesian product
select *from Table name , Table name where Primary key = Foreign keys ;
25. Left connection
select from Table name left join Table name on Primary key = Foreign keys ;
26 Query the average score of a certain item
select avg( Field ) from Table name ;
27. Query the highest score of an item
select max( Field ) from Table name ;
28. Query the lowest score of a certain item
select min( Field ) from Table name ;
29 Total number of query data
select count() from Table name ;
30 Total query score
select sum( Field ) from Table name ;
31. Group query
select * from Table name group by Field ;
边栏推荐
- 2020-10-27
- AutoCAD -- dimension break
- Special information | real estate and office buildings - 22.1.9
- 775 Div.1 B. integral array mathematics
- 质量体系建设之路的分分合合
- Decryption function calculates "task state and lifecycle management" of asynchronous task capability
- 【acwing】528. cheese
- 2022 thinking of Mathematical Modeling B problem of American college students / analysis of 2022 American competition B problem
- The remainder operation is a hash function
- [Business Research Report] top ten trends of science and technology and it in 2022 - with download link
猜你喜欢
[groovy] closure (Introduction to closure class closure | this, owner, delegate member assignment and source code analysis)
SQL set operation
Introduction to JVM principle and process
Flutter 小技巧之 ListView 和 PageView 的各种花式嵌套
Decryption function calculates "task state and lifecycle management" of asynchronous task capability
Number theoretic function and its summation to be updated
Unity parallax infinite scrolling background
[groovy] closure (closure call is associated with call method | call () method is defined in interface | call () method is defined in class | code example)
Autocad-- dynamic zoom
[groovy] closure (closure parameter binding | curry function | rcurry function | ncurry function | code example)
随机推荐
How should programmers learn mathematics
介绍汉明距离及计算示例
Mode in BST (binary tree & Notes on question brushing)
Introduction to JVM principle and process
Download the details and sequence of the original data access from the ENA database in EBI
Private collection project practice sharing [Yugong series] February 2022 U3D full stack class 006 unity toolbar
On-off and on-off of quality system construction
数论函数及其求和 待更新
MySQL in-depth learning - index creation and deletion, index design principles, index failure scenarios, query optimization, index push down ICP
[Chongqing Guangdong education] National Open University 2047t commercial bank operation and management reference test in autumn 2018
775 Div.1 C. Tyler and strings combinatorial mathematics
Emlog blog theme template source code simple good-looking responsive
MD5 bypass
3dsmax2018 common operations and some shortcut keys of editable polygons
AutoCAD - scaling
49 pictures and 26 questions explain in detail what is WiFi?
3dsmax snaps to frozen objects
AutoCAD - window zoom
AutoCAD - feature matching
Wan broadband access technology V EPON Technology