当前位置:网站首页>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 ;
边栏推荐
- AutoCAD - graphic input and output
- Redis 排查大 key 的4种方法,优化必备
- QT Bluetooth: a class for searching Bluetooth devices -- qbluetooth devicediscoveryagent
- Group counting notes (1) - check code, original complement multiplication and division calculation, floating point calculation
- Forecast report on research and investment prospects of Chinese wormwood industry (2022 Edition)
- [ideas] 2021 may day mathematical modeling competition / May Day mathematical modeling ideas + references + codes
- mysql审计日志归档
- A survey of automatic speech recognition (ASR) research
- Leetcode 222 number of nodes of complete binary tree
- CSDN body auto generate directory
猜你喜欢
数论函数及其求和 待更新
[Business Research Report] top ten trends of science and technology and it in 2022 - with download link
AutoCAD -- dimension break
AutoCAD - window zoom
[groovy] closure (Introduction to closure class closure | this, owner, delegate member assignment and source code analysis)
Matplotlib draws three-dimensional scatter and surface graphs
Unity parallax infinite scrolling background
2021 Higher Education Club Cup mathematical modeling national tournament ABCD problem - problem solving ideas
54. 螺旋矩阵 & 59. 螺旋矩阵 II ●●
669. Prune binary search tree ●●
随机推荐
Solutions and answers for the 2021 Shenzhen cup
Difference between singleton and factory pattern
mysql审计日志归档
中国艾草行业研究与投资前景预测报告(2022版)
Error statuslogger log4j2 could not find a logging implementation
CUDA Programming atomic operation atomicadd reports error err:msb3721, return code 1
[Business Research Report] Research Report on male consumption trends in other economic times -- with download link
Matplotlib draws three-dimensional scatter and surface graphs
【acwing】837. Number of connected block points
Unity3d learning notes
Séparation et combinaison de la construction du système qualité
China as resin Market Research and investment forecast report (2022 Edition)
China needle coke industry development research and investment value report (2022 Edition)
Chapter 6 text processing tools for shell programming (awk)
The difference between bundle, chunk and module
Emlog博客主题模板源码简约好看响应式
3dsmax scanning function point connection drawing connection line
MySQL audit log Archive
AutoCAD - Zoom previous
Flutter tips: various fancy nesting of listview and pageview