Oracle Special Symbols

Source: Internet
Author: User
Tags sqlplus

Http://hi.baidu.com/wind_stay/blog/item/85113a6f6553a5d680cb4a0e.htmloracle wildcard characters, using the operator
The conditions used for where comparison are:
equals: =, <, <=, >, >=, <>
Contains: In, not in exists, not exists
Range: Between...and, not Between....and
Match test: like, not like
NULL test: Is NULL, is not NULL
Boolean links: And, or, not
Wildcard characters:
In the WHERE clause, wildcards can be used with a like condition. In Oracle:
Percent (Percent semicolon): used to represent any number of characters, or there may not be any characters at all.
_ (Underscore): represents the exact unknown character.
? (question mark): Used to represent the exact unknown character.
# (pound sign): used to denote the exact Arabic numerals, 0 to 9.
[A-d] (square brackets): Used to represent a range of characters, from a to D here.
Single quotation marks ('): In Oracle, you should enclose text and characters and dates in single quotation marks, and you cannot enclose numbers in quotation marks, including single and double quotes.
Double quotation marks ("): In Oracle, single and double quotes have different meanings. Double quotation marks are used to enclose column aliases that contain specific characters or spaces. Double quotation marks are also used to put text in a date format.
Apostrophe ('): In Oracle, apostrophes can also be written as two single quotes adjacent to each other. In order to find all the vendor names with apostrophes in the middle of the supplier name, you can write code like this:
SELECT * from l_suppliers where supplier_name like '% '% '
& Symbols:,& symbols are commonly used in Oracle to indicate a variable. For example, &fox is a variable, slightly different kind of a && fox. Whenever &fox appears in an Oracle script, you will be asked to provide a value for it. With &&fox, you only need to provide the variable value for & &fox The first time it appears. If you want to use the & symbol as a normal symbol, you should turn off this feature. To turn off this feature, you can run the following command: Set define off, which is a sqlplus command, not an SQL command. Sqlplus sets the environment in which SQL runs in Oracle.
Double vertical bar (| | ): Oracle uses a double vertical bar to represent string join functions.
Asterisk (*): SELECT * means that all columns are selected, and count (*) means that all rows are calculated, representing 0 or any number of characters when the wildcard character is represented.
Forward slash (/): Used in Oracle to terminate SQL statements. More precisely, it means "Run the SQL code that is now in the buffer." The forward slash is also used as a separator.
Multiline Comment:/*......*/.
Not equal to: there are multiple ways of expression:! =, ^=, <>, not xxx=yyy, not (xxx=yyy) assignment:=>

Oracle Special Symbols

Related Article

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.