Author: Brent
Oracle database is favored by more and more enterprises because of its high reliability, security and compatibility. How to keep Oracle databases in good performance is a concern for many database administrators and may be considered
Today, Oracle databases are favored by more and more enterprises because of their high reliability, security and compatibility. The reader may wish to consider some of the following aspects of how to keep the Oracle database permanently in good
MySQL tutorial How to use the unique index
Grammar:UNIQUE KEY ' test ' (' Xref_key ', ' xref_dbname ')UNIQUE KEY ' Xref_key ' (' Xref_key ', ' xref_dbname ')
The above syntax checks whether the combination of Xref_key and Xref_dbname is a unique
The Union operator can combine a collection of query results from two or more SELECT statements into a single result set, that is, to execute a federated query. The syntax format for Union is
SELECT
From
WHERE
UNION
SELECT
From
MySQL tutorial full-text Search, SQL writing:MATCH (Col1,col2,...) Against (expr [in BOOLEAN MODE | With QUERY expansion])
Like what:SELECT * from articles WHERE MATCH (title,body) against (' database ');
The MATCH () function performs a natural
ALTER TABLE allows you to modify the structure of an existing table. For example, you can add or delete columns, create or eliminate indexes, change the type of existing columns, or rename columns or the table itself. You can also change the
MySQL tutorial cursor cursor definition
DECLARE cursor_name cursor for select_statement;
Cursor operations
Open cursor
OPEN cursor_name;
Fetch gets the record of the cursor's current pointer and passes it to the specified list of variables,
Aggregate functions, such as SUM, often need to add a GROUP by statement.GROUP by statementThe GROUP BY statement is used to combine aggregate functions to group result sets based on one or more columns.
SQL GROUP by syntaxSELECT column_name,
And and OR operatorsAnd and or can combine two or more conditions in a where child statement.
If both the first and second conditions are true, the AND operator displays a record.
If one of the first and second conditions is true, the OR operator
To implement a fuzzy query in SQL We just need to use like to be able to achieve, with some of the middle of the parameters such as%? And so on, let's look at an example.Like operatorThe LIKE operator is used to search for a specified pattern in a
SQL Date Subtraction DateDiff () returning two date days
Definitions and usageThe DATEDIFF () function returns the number of days between two dates.
GrammarThe DATEDIFF (date1,date2) date1 and Date2 parameters are valid date or date/time
Executes a command string, string, or one of the following modules in a Transact-SQL batch: system stored procedure, user-defined stored procedure, scalar-valued user-defined function, or extended stored procedure.
Execute a stored procedure or
SQL trigger trigger creation and usage
The transmitter is also a pl/sql block with a name. Triggers are similar to procedures and functions because they all have declarations
, execution, and exception handling procedure with the name Pl/sql block.
1, Partition table: (>2G) to optimize the large table (Range partitioning,list partitioninghash partitioning,composite Partitioning)
--Create a partitioned table by range
1 CREATE TABLE Sales_range
2 (salesman_id number (5),
3 Salesman_name
This article describes the data of MySQL learning notes to increase, delete and change the implementation method. Share to everyone for your reference, specific as follows:
I. Additional data
Insert code Format:
Insert INTO indicates [column name
1. First introduce the basic usage of row_number () over
2. Take a look at the instance data
Initializing data
CREATE TABLE employee (empid int, deptid int, salary decimal (10,2))
INSERT into employee values (1,10,5500.00)
INSERT into
Distinct this keyword to filter out the extra duplicate records only one, but often use it only to return the number of records not duplicates, rather than using it to return all the values not to be recorded. The reason is that distinct only use
The MySQL desc command is used to view the table structure, which is the shorthand form for the describe command.
MySQL desc command syntax:
DESC TableName
What information does the command display on the table? The specific include:
--Start
I personally think that there should not be a null value in the database because he subverted the two-valued logical structure (i.e. true and false), and a three-valued logical structure (i.e. true, false, and unknown) occurred. Because of
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.