• SQL higher order (window function)


    Window function Window function is also known as OLAP (online analytical processing) function, which means real-time analysis and processing of database data. Window function is in Oracle and SQL serverAlso known as analysis function, window function syntax is as follows < window function > over ([partition by < column list >] Order by < list […]

  • [post] compatibility level of SQL Server


    Original post address:https://www.cnblogs.com/jinanxiaolaohu/p/10030021.html Alter database (transact SQL) compatibility level https://docs.microsoft.com/zh-cn/sql/t-sql/statements/alter-database-transact-sql-compatibility-level?view=sql-server-2017 Applicable objects:SQL Server (from 2008)Azure SQL databaseAzure SQL data warehouseParallel data warehouse Set some database behaviors to match the specifiedSQL server version is compatible.  For other alter database options, seeALTER DATABASE (Transact-SQL)。 For more information about syntax conventions, seeTransact SQL syntax conventions。 grammar copy ALTER […]

  • Explan of MySQL


    Explain usage The meaning of explain result field id select_type table type possible_keys key key_len ref rows filtered Extra Explain using examples summary Blog reference Extended reading Using explain to query and analyze SQL execution records, you can optimize the performance of SQL! Explain usage mysql> explain select * from students; +—-+————-+———-+——+—————+——+———+——+——+——-+ | id | […]

  • Explain in MySQL


    explainExplain simulates the optimizer to execute SQL statements. In 5.6 and later versions, except for select, others such as insert, update and delete can use explain to view the execution plan, so as to know how MySQL processes SQL statements and analyze the performance bottlenecks of query statements or table structures.effect1. Read order of tables2. […]

  • Data analysis SQL advanced


    1 Introduction SQL advanced mainly introduces predicate, case expression, nested subquery, join (join the table by column) and union operation (table as unit). 2 SQL advanced 2.1 predicate LIKE Before introducing like, first introduce wildcard characters. MySQL only supports percent sign (%) and underline (_) , percent sign replaces 0 or more characters, and underline […]

  • Getting started with Amazon dynamodb 8: deleting projects


    The last article introduced the dynamodb update, this one will introduce the project deletion operation and dynamoab py Delete data from table In SQL, the delete statement removes one or more rows from the table.Dynamodb uses the delete item operation to delete items one at a time. SQL In SQL, you can use the delete […]

  • Listag of Oracle function


    It can realize the splicing of column values. Let’s take a look at its specific usage. The official document explains its role as follows: For a specified measure, LISTAGG orders data within each group specified in the ORDER BY clause and then concatenates the values of the measure column. That is, within each group, listaggSort the column plants according to […]

  • 30 optimization methods of common SQL query statements in MySQL


    1. Try to avoid using the! = or < > operator in the where clause, otherwise the engine will abandon the use of index and scan the whole table. 2. To optimize the query, we should avoid scanning the whole table as much as possible. First of all, we should consider building indexes on the […]

  • Oracle foundation — query statement (1)


    Oracle foundation — query statement (1) Syntax of query statements SELECT \* |{\[DISTINCT\] column|expression \[alias\], … } ​ FROM table ​ WHERE conditions ​ GROUP BY ​ ORDER BY column \[ASC | DESC\]; Tips: Case insensitive It can be written in multiple lines Keywords cannot be abbreviated or span multiple lines Usually each clause occupies […]

  • SQL where clause


      The where clause is used to specify the criteria for selection.   Where clause To conditionally select data from a table, add where to the select statement. Grammar:   Select column name from table name where column operator value     The following operators can be used in the where clause. Operator describe = […]

  • Oracle foundation — query statement (2)


    Where clause After the word from. Grammar: SELECT *|{[DISTINCT] column|expression [alias], …} FROM table [WHERE condition(s)]; Tips: Strings and dates can be used in expressions in select statements and in expressions in where conditions. String and date should be marked with single quotation marks. String case sensitive Date has a certain format, the default isDD-MON-YY。 […]

  • Python common errors and exceptions! Incidental treatment method


    As a python beginner, when learning python programming, we often see some error messages. Python has two types of errors that are easy to recognize: syntax errors and exceptions. Python assert is used to judge an expression and trigger an exception when the expression condition is false. syntax error Python syntax errors, or parsing errors, […]