search
HomeDatabaseMysql TutorialOracle通配符,运算符的使用, 冒号问题

双竖线(||):Oracle使用双竖线表示字符串连接函数。星号(*):select *意味着选择所有的列,count(*)意味着计算所有的行,表示

用于where比较条件的有 :

等于:=、、>=、

>,<:>

>=.

=:等于

!=,,^=:不等于

包含:in、not in    exists、not exists

范围:between...and、not between....and

匹配测试:like、not like

Null测试:is null、is not null

布尔链接:and、or、not

通配符 :

在where子句中,通配符可与like条件一起使用。在Oracle中:

%(百分号):    用来表示任意数量的字符,或者可能根本没有字符。

_(下划线):     表示确切的未知字符。

?(问号):         用来表示确切的未知字符。

#(井号):         用来表示确切的阿拉伯数字,,0到9。

[a-d](方括号):用来表示字符范围,在这里是从a到d。

单引号('):在Oracle中,应该只使用单引号将文本和字符和日期括起来,不能使用引号(包括单双引号)将数字括起来。

双引号("):在Oracle中,单双引号含义不同。双引号被用来将包含特定字符或者空格的列别名括起来。双引号还被用来将文本放入日期格式。

撇号('):在Oracle中,撇号也可以写成彼此相邻的两个单引号。为了在供应商名字中间查找所有带撇号的供应商名字,可以这样编写代码:

select * from l_suppliers where supplier_name like '%''%'

&符号:在Oracle中,&符号常用来指出一个变量。例如,&fox是一个变量,稍微有点不同的一种&& fox。每当&fox出现在Oracle脚本中时,都会要求您为它提供一个值。而使用&&fox,您只需要在& &fox第一次出现时为它提供变量值。如果想将&符号作为普通的符号使用,则应该关闭这个特性。要想关闭这个特性,可以运行以下的命令: set define off ,这是一个SQLplus命令,不是一个SQL命令。SQLplus设置了SQL在Oracle中运行的环境。

双竖线(||):Oracle使用双竖线表示字符串连接函数。

星号(*):select *意味着选择所有的列,count(*)意味着计算所有的行,表示通配符时,表示0个或任意多个字符。

正斜杠(/):在Oracle中,用来终止SQL语句。更准确的说,是表示了“运行现在位于缓冲区的SQL代码”。正斜杠也用作分隔项。

多行注释:/*......*/。

不等于:有多种表达方式:!=、^=、、not xxx=yyy、not(xxx=yyy)

--------------------------------------------------------------------------------

在Oracle中。":"有2中意思;

一:给变量 赋值 , 如, names varchar2(10) :='aa'; 这是把"aa"赋值给变量names

二:表示引用。即引用表中字段所对应的值

如:emp表中有个name为“Bob”,那么 : old.name 的值就是"Bob"。

只是表示引用的时候,只能出现在触发器 里面。

linux

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
How do you alter a table in MySQL using the ALTER TABLE statement?How do you alter a table in MySQL using the ALTER TABLE statement?Mar 19, 2025 pm 03:51 PM

The article discusses using MySQL's ALTER TABLE statement to modify tables, including adding/dropping columns, renaming tables/columns, and changing column data types.

How do I configure SSL/TLS encryption for MySQL connections?How do I configure SSL/TLS encryption for MySQL connections?Mar 18, 2025 pm 12:01 PM

Article discusses configuring SSL/TLS encryption for MySQL, including certificate generation and verification. Main issue is using self-signed certificates' security implications.[Character count: 159]

How do you handle large datasets in MySQL?How do you handle large datasets in MySQL?Mar 21, 2025 pm 12:15 PM

Article discusses strategies for handling large datasets in MySQL, including partitioning, sharding, indexing, and query optimization.

What are some popular MySQL GUI tools (e.g., MySQL Workbench, phpMyAdmin)?What are some popular MySQL GUI tools (e.g., MySQL Workbench, phpMyAdmin)?Mar 21, 2025 pm 06:28 PM

Article discusses popular MySQL GUI tools like MySQL Workbench and phpMyAdmin, comparing their features and suitability for beginners and advanced users.[159 characters]

How do you drop a table in MySQL using the DROP TABLE statement?How do you drop a table in MySQL using the DROP TABLE statement?Mar 19, 2025 pm 03:52 PM

The article discusses dropping tables in MySQL using the DROP TABLE statement, emphasizing precautions and risks. It highlights that the action is irreversible without backups, detailing recovery methods and potential production environment hazards.

How do you represent relationships using foreign keys?How do you represent relationships using foreign keys?Mar 19, 2025 pm 03:48 PM

Article discusses using foreign keys to represent relationships in databases, focusing on best practices, data integrity, and common pitfalls to avoid.

How do you create indexes on JSON columns?How do you create indexes on JSON columns?Mar 21, 2025 pm 12:13 PM

The article discusses creating indexes on JSON columns in various databases like PostgreSQL, MySQL, and MongoDB to enhance query performance. It explains the syntax and benefits of indexing specific JSON paths, and lists supported database systems.

How do I secure MySQL against common vulnerabilities (SQL injection, brute-force attacks)?How do I secure MySQL against common vulnerabilities (SQL injection, brute-force attacks)?Mar 18, 2025 pm 12:00 PM

Article discusses securing MySQL against SQL injection and brute-force attacks using prepared statements, input validation, and strong password policies.(159 characters)

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools