Wednesday, February 8, 2017


XMLTYPE in Oracle

CREATE TABLE warehouses(
  warehouse_id NUMBER(4),
  warehouse_spec XMLTYPE,
  warehouse_name VARCHAR2(35),
  location_id NUMBER(4));


INSERT INTO warehouses VALUES 
   (       100, XMLType(
              ' 
               Owned
               '), 'Tower Records', 1003);




SELECT 
  w.warehouse_spec.extract('/Warehouse/Building/text()').getStringVal()
     "Building"
  FROM warehouses w;

where warehouse_spec is an XMLType column operated on by member function extract(). The result of this simple query is a string (varchar2):

Building
-----------------
Owned



UPDATE warehouses SET warehouse_spec = XMLType
                  ('
                    Leased
                    ');





for more details :Click Here

Monday, January 23, 2017


How to share or transfer data using LAN Cable CAT 5

Step 1

Connect both computer with a LAN cable.

Step 2

OK, now you have to enable sharing option on both computers.

Go to Control Panel > Network and Internet > Network and Sharing Center > Advanced sharing settings. And make sure you turn on network detection and turn off password protection off.

enable sharing option . Enable sharing option Step 3 Bring both the computers on the same network. 1. Open Control Panel > Network and Internet > Network Connections.





second PC



Shered Resource



further deatils Click Here..

Thursday, January 19, 2017

Wednesday, January 18, 2017


The JVM Architecture Explained

for detailsclick here

What are Java heap Young, Old and Permanent Generations?
young generation belongs to heap area
old generation belongs to heap area
permanent generation belongs to Non heap area
for more detailsclick here

Monday, January 2, 2017

Volatile Keyword

Basically when two threads accessing same resource or same instance variable
then it must be read from common shared memory which is main memory for synchronise result.
so make it as volatile
For More Details click Here

Sunday, January 1, 2017

How To remove duplicate rows
DELETE e1 FROM EMPLOYEE e1, EMPLOYEE e2 WHERE e1.name = e2.name AND e1.id > e2.id;
for more details
1.
find Highest salary select MAX(Salary) from Employee;
2.
Find Second Highest Salary
ELECT MAX(Salary) FROM Employee WHERE Salary NOT IN (SELECT MAX(Salary) FROM Employee )
3.
Find Nth Highest Salary
SELECT * /*This is the outer query part */
FROM Employee Emp1
WHERE (N-1) = ( /* Subquery starts here */
SELECT COUNT(DISTINCT(Emp2.Salary))
FROM Employee Emp2
WHERE Emp2.Salary > Emp1.Salary)

we can use limit as well
SELECT Salary FROM Employee
ORDER BY Salary DESC LIMIT n-1,1