Aggregate functions are functions that are used to sum, average, and maximum minimum values.Commonly used are count, SUM, MAX, MIN, AVG.Count ()The parameter is a column name, or you can use * to represent all columns.The default * will count all rows of data, and if you want to filter out null rows, specify a specific column name.Filter Blank lines:Mysql> SELECT * FROM Employees where ' to_date ' is null; Empty Set (0.00 sec)Aggregation and sequencing of SQ
table has a value, and no match is substituted with a null value.SELECT * from A left OUTER JOIN B on a.name = B.nameA 3.RIGHT [OUTER] JOIN produces a full set of Table B, and a match in table A has a value, and no match is substituted with a null value.SELECT * from A right OUTER JOIN B on a.name = B.nameThe 4.FULL [OUTER] JOIN produces a and B's set. For records that do not have a match, NULL is the value.SELECT * from A full OUTER JOIN B on a.name = B.nameYou can find the value without match
) from EMP;Select Job,avg (SAL) from EMP*ERROR at line 1:Ora-00937:not a single-group group function--Use the HAVING clause to filter the grouped results-Query The department number above the average wage and its average wage.Select Deptno,avg (SAL) from EMP Group BY DEPTNO have avg (SAL) >2000;Idle> Select Deptno,avg (SAL) from EMP Group BY DEPTNO have avg (SAL) >2000; DEPTNO AVG (SAL)--------------------20 217510 2916.66667 --to find out the average wage in the above jobs (job)Select Job
Tags: def modify pre number not block PAC creat time1. How the data is stored (table property Operations)
1.1 questions to consider before building a table
A. Table name
B. table contains data type (CHAR (fixed-length character), VARCHAR (indefinite long character), number (numeric), date (date and time), BLOB (large data set), straight string, custom type)
C. Fields that make up the primary key
D. length of each field
E. Which fields can be null1.2 CREATE TABLE Statement
Ba
A1. 1 LTRIM (character_expression)-- Delete the starting space in the character variable 2 RTRIM ( character_expression)-- Delete trailing spaces in the character variable 2. Gets the start position of the returned start of the specified string. Return position starting from 1, not starting from 0 1 CHARINDEX (expression1, expression2 [ , Start_location ] ) (ii) SUBSTRING (expression, start, length) parameter expression is a string, a binary string, a text, an image, a column, or a containing
Straight to the point------F41. EnquirySearch queries for the specified data table or view to find the functionality that meets the query criteria, including the following SQL syntax, where "" is optionalselect2. Defining the DDLData definition Language, a language used to define and revoke a specified database object (data tables, views, indexes, stored procedures, users, etc.),①. The "Create table/alter table/drop table" statement for the data table
(commit statement)Committing a transaction means persisting all the operations of the database to the database, which is usually done using a commit statement. Execution order:A. Records that the current transaction has been committed within the rollback segment and claims a unique system number (SCN) to uniquely identify the transaction. B. Start the background log write process (LGWR), write the data in the redo log buffer of the SGA area and the SCN of the current transaction into the redo
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.