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;