当前位置:网站首页>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 ;
边栏推荐
- Use assimp library to read MTL file data
- #775 Div.1 C. Tyler and Strings 组合数学
- 介绍汉明距离及计算示例
- 3dsmax common commands
- AutoCAD - set layer
- AutoCAD - command repetition, undo and redo
- Sqlserver stored procedures pass array parameters
- This article is good
- China needle coke industry development research and investment value report (2022 Edition)
- Leetcode 222 number of nodes of complete binary tree
猜你喜欢
PostgreSQL 超越 MySQL,“世界上最好的编程语言”薪水偏低
質量體系建設之路的分分合合
[groovy] closure (closure as function parameter | code example)
669. 修剪二叉搜索树 ●●
【acwing】528. cheese
AutoCAD - full screen display
【Leetcode】1352. Product of the last K numbers
质量体系建设之路的分分合合
Redis 排查大 key 的4种方法,优化必备
2022 thinking of Mathematical Modeling B problem of American college students / analysis of 2022 American competition B problem
随机推荐
"Measuring curve length" of CAD dream drawing
The first topic of ape Anthropology
LeetCode之单词搜索(回溯法求解)
A survey of automatic speech recognition (ASR) research
Use assimp library to read MTL file data
English topic assignment (27)
MySQL in-depth learning - index creation and deletion, index design principles, index failure scenarios, query optimization, index push down ICP
Difference between singleton and factory pattern
Detailed introduction of OSPF header message
[groovy] closure (Introduction to closure class closure | this, owner, delegate member assignment and source code analysis)
C4D simple cloth (version above R21)
Group counting notes (1) - check code, original complement multiplication and division calculation, floating point calculation
775 Div.1 B. integral array mathematics
#775 Div.1 C. Tyler and Strings 组合数学
2021 electrician Cup - high speed rail traction power supply system operation data analysis and equivalent modeling ideas + code
Scope of package class package
2020-10-27
AutoCAD - feature matching
Detailed explanation of the ranking of the best universities
2022 U.S. college students' mathematical modeling e problem ideas / 2022 U.S. game e problem analysis