2017-07-12 (Database)

Source: Internet
Author: User
Tags logical operators

Use Sql*plus to: Describe the table structure. Edit the SQL statement. Executes the SQL statement. Save SQL in a file and save the results of the SQL statement execution in a file. Executes the statement in the saved file. Loads a text file into the Sql*plus edit window.

Use the WHERE clause to filter out rows that do not meet the criteria. The WHERE clause follows the FROM clause.

The characters and dates are enclosed in single quotation marks. Character case sensitive, date format sensitive. The default date format is DD-MON-RR.

Use the like operation to select a similar value selection criteria can contain characters or numbers:% represents 0 or more characters. _ Represents a character.

Use the WHERE clause to filter the data using the between, in, like, and null operations using the logical operators and, OR and not using the ORDER BY clause to sort.

Single-line function: The action data object receive function returns a result that operates on only one line each row returns a result that can be transformed data types can be nested parameters can be a column or a value

Oracle internal Use digital storage date: century, year, month, day, hour, minute, second. The default date format is DD-MON-RR. You can only specify the date after which the second two digits of the year are stored in 20th century. It is also possible to store the 20th century date in 21st century.

The advantage of coalesce compared to NVL is that coalesce can handle alternating multiple values at the same time. If the first expression is empty, the expression is returned, and the other arguments are coalesce.

Use if-then-else logic in SQL statements. Use two methods: Case expression DECODE function

Use joins to query data in multiple tables. Writes the join condition in the WHERE clause. When you have the same column in the table, precede the column name with the table name prefix.

2017-07-12 (Database)

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.