1. Summarize the syntax for querying 10-20 Records in Oracle, SQL Server, and MySQLOne: Oracle database notation:1:select * FROM (select RowNum RN, * from table name wher rownumwhere a.rn>102:select * FROM table name where rownumMinusSELECT * FROM
Simple data query:
5.1 Basic structure of the query:SQL statement: SELECT [DISTINCT] (* | column [alias],...) from table [Where condition] [order Bycolumn];5.2 Projection Operation:The projection operation refers to the use of the SELECT
Material is from the textbook down, the main content is practice examples, in writing blog post learning command line, of course, I hope this blog post can help others learn mysq database commandSelect statement to select specific rows and columns
One: Oracle database notation: 1:select * FROM (select RowNum RN, * from table name where?rownum ? where a.rn>10 2:select * FROM table name where rownum Minus SELECT * FROM table name where rownum ? II: SQL Server database notation: 1:select Top *
A: whereIn the previous article, a rough introduction to where, but where can be followed by other conditions, now let's say one by one1.between: Between a value of twoI created a table called person with id,name,age,post in it, and then inserted a
Basic classification of query operations for databases:1. Projection Operation 2. Select Action 3. Sort operationsProjection operation:SELECT column list from table name;SELECT * from table name; (Query entire table)SELECT column name as new column
1. Clear the screenWindows:host CLS;Linux:host Clear;2. Processing of dates1) system default type:Select Sysdate from dual;--> Note: Sysdate is the system's current time system default format: Day-month-year2) usage of to_char ()Syntax: To_char
During the project process today, duplicate records exist in Oracle database tables, and duplicate data needs to be removed during display. After thinking for a long time, I finally used rank () over (partiti
During the project process today,
Main Oracle Data Types
Overview: The data types supported by various databases are similar to those in standard SQL languages.
Type: varchar2: You can set the maximum length of a field when declaring it. After using it, you do not have to consider
Statement 1. ORACLEwww.2cto. comSELECT * statements. INFORMIXSELECTFIRSTN * statements. DB2SELECT * ROW_NUMBER () OVER (ORDERBYCOL1DESC) ASROWNUMWHEREROWNUMN or SELECTCOLUMNFROMT
The statement for the database to take the first few records 1. ORACLE
(EnterMysql \ binDirectory)Note thatMysqlAdd points after each sentence in the console;
1. Enter mysql-u username-p Password
2. Export Database mysqldump-u user name-p Password Database Name (Table Name)> path backup. SQL
3. Import database mysql-u
For details about Oracle grouping query, grouping Functions Act on a group of data and return a value for a group of data
For details about Oracle grouping query, grouping Functions Act on a group of data and return a value for a group of data
Overview of major Oracle data types: The data types supported by various databases are similar, which may differ slightly from those in standard SQL languages. Type: varchar2: You can set the maximum length of a field when declaring it. After using
Some SQL statements may generate temporary tables. we should try to avoid temporary tables. because temporary tables will waste memory and time. under what circumstances will temporary tables be generated?PowerbetIf there is an order by clause and a
[Oracle entry series] Chapter 2 _ Functions -- v512 studio Editor: Xuan Yu
Function
Nvl () function
Count () function
Case expression
My blog
Date type
Nvl2 () function
Dedode () function
Having clause
Oracle analysis function RANK () | ROW_NUMBER () | LAG () use the ROW_NUMBER () function: row_number () is similar to rownum, more powerful (can be sorted from 1 on each group), more efficient (? The efficiency is worse. In actual tests ).
An index is a special file (an index on an InnoDB data table is an integral part of a tablespace) that contains reference pointers to all records in the data table.
Note:
[1]Indexing is not omnipotent!
Indexing speeds up data retrieval, but slows
Mysql simple command statement resume-*, as, groupby, orderby, groupby, having, limit;-Cainiao is learning to fly!
It's not easy to be a Cainiao. it's hard to survive in this world.
Continue hitting the SQL command in the simple cmd command!
First,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.