Click here to learn What is Public Synonym
What is (Private) Synonym?
Click here to learn What is Public Synonym
What is Oracle Least Function?
Oracle SQL/PLSQL offers least function that will return least of values from a list provided. The syntax of the functions is:
LEAST (val1, val2, …valn)
Example:
SELECT least(10,9,35) low_value FROM dual;
The output is:
LOW_VALUE
---------------
9
Note: If there is at least one NULL value in the least, the output will be always NULL. This is because least will not be able to identify the next least value. For avoiding this problem always make sure of using either NVL or DECODE for passing values.
Generating sequential numbers without using user_objects
Sequence number generation in a query has been almost natural in reporting queries. You normally tend to use rownum pseudo column from either your table or if it is a generic query user_objects.
For example:
select rownum from user_objects where rownum <= 100;
The output will be:
ROWNUM
---------------
1
2
3
.
.
100
This is based on the assumption that there are more number of objects in user_objects view so as to return a high number. The more robust way to get an output without using such a large view was not literally possible in pre-9i era. Starting 9i Oracle has come up with a beautiful solution. You can use DUAL table in conjunction with CONNECT BY clause to come up with such a result.
Example:
select level from dual connect by level <=100;
This also will generate the same output generated in our first case.
What is Public Synonym?
How to create a Public Synonym?
The syntax for creating a public synonym is
CREATE [ OR REPLACE ] PUBLIC SYNONYM synonym_name FOR object;
Example:
Click here to learn What is (Private) Synonym?
How to kill a process within windows BATch file
This is the solution in brief:
START "do something window" dir
FOR /F "tokens=2" %I in ('TASKLIST /NH /FI "WINDOWTITLE eq do something window"' ) DO SET PID=%I
ECHO %PID%
TASKKILL /PID %PID%
FOR Loop is only required if there are multiple processes.
A link is what I am going to provide as for more information:
Click here to access the solution