1. How to Select 38th row details in table without using rownum?

Select * from Table_name
where rownum < 39
MINUS
Select * From Table_name
Where rownum < 38;

2. Display details of employees who are senior to there own manager?

select e.ename,e.hiredate,m.ename,m.hiredate from emp e,emp m
where e.mgr=m.empno
and e.hiredate<m.hiredate

3. How to resolve the sqlcode -501 error in db2?

This is due to the cursor declaration in which the application program has attempted to fetch some data's into a cursor that was neither declared nor opened. So, Always follow DECLARE,OPEN,FETCH,CLOSE while working with cursors.

4. When e open the data base the data base gives error as initializing or terminating how we log into data base?

just wait for a few seconds and then try
its
Database initializing or shutdown in process

5. This is the exception raised when i am working with oracle 11g java.lang.ClassNotFoundException: oracle.jdbc.Driver.Ora
cleDriver.. but i set the class path for both oracle and java?

ClassNotFoundException is the checked exception so we must handle that one or we can declare as throws keyword.
ex:
class EmployeeDao{
public static void main(String args[0]throws SQLException, ClassNotFoundException{
------------
-------------
}

}

6. TNS-00204: Started tracing in intlsnr

Cause: Internal message- Successfully started tracing
information.

Action: None.

Please add more information about this Error

7. TNS-00205: Turning off tracing in intlsnr

Cause: Internal message - Turned off tracing in the
Interchange listener.

Action: None

Please add more information about this Error

8. TNS-00206: Status Information for Interchange string:

Cause: Message sent back by Interchange as header for status
request.

Action: None

Please add more information about this Error

9. TNS-00207: Uptime : number days number hr. number min.
number sec

Cause: Part of status request.

Action: None

Please add more information about this Error

10. TNS-00208: Logging : string

Cause: Part of status request.

Action: None

Please add more information about this Error

11. TNS-00209: Tracing : string

Cause: Part of status request Interchange.

Action: None

Please add more information about this Error

12. TNS-00210: Total Pumps Available : number

Cause: Part of status request for Connection Manager.

Action: None

Please add more information about this Error

13. TNS-00215: Total Successful Connections : number

Cause: Part of status request for Connection Manager.

Action: None

Please add more information about this Error

14. TNS-00211: Total Active Pumps : number

Cause: Part of status request for Connection Manager.

Action: None

Please add more information about this Error

15. TNS-00212: Total Pumps Started : number

Cause: Part of status request for Connection Manager.

Action: None

Please add more information about this Error

16. TNS-00213: Available Connections : number

Cause: Part of status request for Connection Manager.

Action: None

Please add more information about this Error

17. TNS-00214: Total Connections in Use : number

Cause: Part of status request for Connection Manager.

Action: None

Please add more information about this Error

18. TNS-00216: Total Failed Connections : number

Cause: Part of status request for Connection Manager.

Action: None

Please add more information about this Error

19. TNS-00217: Total Bytes of Data : number

Cause: Part of status request for Connection Manager.

Action: None

Please add more information about this Error

20. TNS-00218: Current Bytes/Sec. : number

Cause: Part of status request for Connection Manager.

Action: None

Please add more information about this Error