In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
How do I use wildcards and operators in oracle? Many novices are not very clear about this. In order to help you solve this problem, the following editor will explain it in detail. People with this need can come and learn. I hope you can gain something.
The conditions used for where comparison are:
Equal to: =,
Contains: in, not in exists, not exists
Range: between...and, not between....and
Match test: like, not like
Null testing: is null, is not null
Boolean links: and, or, not
Wildcard characters:
In the where clause, wildcards can be used with like conditions. In Oracle:
% (percent sign): used to represent any number of characters, or there may be no characters at all.
_ (underscore): indicates the exact unknown character.
? (question mark): used to indicate the exact unknown character.
# (pound sign): used to indicate the exact Arabic numeral, 0 to 9.
[amurd] (square brackets): used to indicate a range of characters, in this case from a to d.
Single quotation marks ('): in Oracle, only single quotation marks should be used to enclose text and characters and dates, not numbers (including single and double quotation marks).
Double quotation marks ("): single and double quotation marks have different meanings in Oracle. Double quotation marks are used to enclose column aliases containing specific characters or spaces. Double quotation marks are also used to put text in date format.
Apostrophes ('): in Oracle, apostrophes can also be written as two single quotation marks adjacent to each other. To find all the supplier names with apostrophes in the middle of the supplier name, you can write code like this:
Select * from l_suppliers where supplier_name like'%'%'
& symbol: in Oracle, the & symbol is often used to indicate a variable. For example, & fox is a variable, a slightly different kind of & & fox. Whenever & fox appears in an Oracle script, you are asked to provide a value for it. With & & fox, you only need to provide the value of the variable to & & fox when it first appears. If you want to use the & symbol as a normal symbol, you should turn this feature off. To turn off this feature, run the following command: set define off, which is a SQLplus command, not a SQL command. SQLplus sets the environment in which SQL runs in Oracle.
Double vertical bar (| |): Oracle uses double vertical bar to represent string concatenation function.
An asterisk (*): select * means to select all columns, and count (*) means to calculate all rows, indicating 0 or any number of characters when representing wildcards.
Forward slash (/): in Oracle, used to terminate a SQL statement. 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 many expressions:! =, ^ =, not xxx=yyy, not (xxx=yyy)
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.