There are three ways to write a script that ends with a percentage sign in Oracle.

Source: Internet
Author: User

There are three ways to write a script that ends with a percentage sign in Oracle.

Data

The goal is to get the data row with ID = 4443. There are three methods to record it:

First, substr:

SELECT * from test where substr (NOTE,-1) = CHR (37 );

Second, escape:

SELECT * from test a where a. note like '% \ %' escape '\';

Third, regular expression:

SELECT * from test where REGEXP_LIKE (NOTE, '% $ ');

Write the percent sign first, or first/

Write o first, then write/then write o

Oracle script

I can only teach you the general idea, but the program still has to be written by yourself. Students!
It indicates that the two databases are accessible. Does DBLINK be used for Table query?
If yes, select count (*) from B @ dblink_name; in the C database.
As for matching and distributing data, you can use the process and function. Or SHELL scripts.

Supplement:
I will standardize your example:
Declare
N_count number (10); -- defines 10 digits of the variable type.
Begin
Select count (*) into n_count from table;
If n_count = 0 then
Insert ...;
End if;
End;

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.