Niu Ke SQL question brushing record

summary on must be used with join SQL1 finds all the information of the latest employee select*from employees order by hire_date desc limit 1; select * from employees where hire_date = (select max(hire_date) from employees); ORDER BY sorts the result set according to the specified column. By default, ORDER BY DESC is in ascending ...

Posted by easmith on Sun, 31 Oct 2021 06:13:42 -0700

Database class notes 11 (slow query log)

analysis ● 1. Observe and run for at least one day to see the slow production ● 2. Start the slow query log, set the threshold value, for example, slow SQL is more than 5 seconds, and grab it ● 3.explain + slow SQL analysis ● 4.show profile ● 5. Optimize the parameters of SQL database server (O & M or DBA) summary ● 1. Enable and capture ...

Posted by sw9 on Sat, 30 Oct 2021 20:30:39 -0700

MyBatis framework dynamic Sql

MyBatis framework dynamic Sql Dynamic SQL: judge the conditions through various tags provided by MyBatis to realize dynamic splicing of SQL statements. The expression used for conditional judgment here is OGNL expression. The commonly used dynamic SQL tags are,,, and so on. The dynamic SQL statement of MyBatis is very similar to the stat ...

Posted by Pyro4816 on Sat, 30 Oct 2021 02:13:56 -0700

Oracle Database: Installation & function query & condition query

1. Course introduction first day: 1.Oracle concept and installation 2. Basic query 3. Condition query 4. Functions in Oracle the second day: 1. Multi table query (mysql also has the same concept, different syntax and important aspect) 2. Sub query (it also exists in mysql, with the same concept, different syntax and important aspect) on th ...

Posted by troublemaker on Fri, 29 Oct 2021 17:42:01 -0700

MySQL full backup and recovery

introduction With the rapid development of office automation and e-commerce, enterprises rely more and more on information system. Database, as the core of information system, plays an important role. Database backup is an important means to recover important data in time and prevent data loss in case of data loss. A reasonable database ...

Posted by Hayce on Fri, 29 Oct 2021 06:46:24 -0700

Oracle learning VII - Oracle table building

Oracle create table Oracle table is the core of Oracle database and the logical basis for storing data. Oracle table is a two-dimensional data structure. The data with column fields and corresponding columns constitute a data storage structure. You can simply look at a two-dimensional table in rows and columns. Columns represent Oracle columns ...

Posted by PRodgers4284 on Mon, 25 Oct 2021 19:48:57 -0700

Chapter 56 SQL command INSERT OR UPDATE

Chapter 56 SQL command INSERT OR UPDATE Add a new row to the table or update an existing row in the table. outline INSERT OR UPDATE [%keyword] [INTO] table SET column = scalar-expression {,column2 = scalar-expression2} ... | [ (column{,column2} ...) ] VALUES (scalar-expression {,scalar-expression2} ...) | ...

Posted by travelerBT on Mon, 25 Oct 2021 16:34:57 -0700

Mybatis complex mapping

Variable parameters The location of method parameters in java supports one syntax Method name ([type]... Variable name) The above expression is variable parameter //Declare a method with variable parameters public void sum(int... nums){ //Parameter... Indicates that the variables specified by this parameter are processed as an array ...

Posted by Ghost_81st on Sun, 24 Oct 2021 20:59:16 -0700

Chapter 55 SQL command INSERT

Chapter 55 SQL command INSERT (4) Embedded SQL and dynamic SQL examples The following embedded SQL example creates a new table SQLUser.MyKids. The following example uses INSERT to populate this table with data. After inserting the sample, an example of deleting SQLUser.MyKids is provided. ClassMethod Insert2() { &sql( CREA ...

Posted by leap500 on Sun, 24 Oct 2021 17:12:54 -0700

APIJSON blog 4 AbstractSQLConfig Article 4

2021SC@SDUSC Continue the analysis of AbstractSQLConfig last week. The following code is @ override @Override public boolean isExplain() { return explain; } @Override public AbstractSQLConfig setExplain(boolean explain) { this.explain = explain; return this; } @Override public List<Join> getJoinList() { return joinList ...

Posted by vickyjackson on Sat, 23 Oct 2021 20:04:48 -0700