GeekInterview.com
Series: Subject: Topic:

Data Access Interview Questions

Showing Questions 1 - 20 of 32 Questions
First | Prev | | Next | Last Page
Sort by: 
 | 

How we can transform the columns of a table in rows ?

Asked By: disara | Asked On: Oct 30th, 2007

Answered by: ravinder lathwal on: May 4th, 2012

Using pivot option in SQL server 2008.

Answered by: sankar babu on: May 25th, 2011

by using decode function

Indexes in a SQL query issue

Asked By: anurag.tiwari_1986 | Asked On: Mar 13th, 2012

We have a table that contains around 25,00,000 rows.The where clause is on month-year. Indexes in a SQL query are picking up sometimes but the same query is not picking same indexes at different time the query is picking up the index some times but the exactly same query is not picking those indexes...

Information about a particular disk

Asked By: Deeoak Singh | Asked On: Nov 22nd, 2011

There are show many hard disks attached in system, how I know a particular disk information in solaris operating system?

Application of cursors in different applications

Asked By: p phanindra | Asked On: Oct 18th, 2011

I am in a dilemma in thinking how different types of cursors are useful in applications. like dynamic scrollable cursors are used where result set changes are reflected like in airline reserVATion system.. but can you tell me the usage of insensitive scrollable cursor(in which application) in real world.. and...

How to subtract 2 dates in Oracle to get in hour and minute

Asked By: K Mack Ahmed | Asked On: Sep 18th, 2011

I want to subtract 2 dates and represent the result in hour and minute in one decimal figure. i have the following table and I am doing it in this way but the result is not as desired. there is some slight variation, im sure this is simple arithmetic but im not getting it right. select start_time,...

How to subtract 2 dates to get the result in hour and minute

Asked By: K Mack Ahmed | Asked On: Sep 17th, 2011

Hi there.. i have 2 date fields in my table. I want to subtract these 2 date fields to get the result in hour and minute. below is what I have and what I am doing but the result is not as I want.. date1 date2 date2-date1*24 (is what I am doing) 21-06-2011...

Find users running the script

Asked By: Beena | Asked On: Mar 6th, 2008

How do you find the users who are running the script ?

Answered by: dclavio on: Aug 4th, 2010

ps -auxw

Answered by: vinoth86 on: May 27th, 2008

Use v$session view.

How to find that when and which record inserted in the table ?

Asked By: vijay | Asked On: Nov 6th, 2007

Answered by: girish1983 on: May 5th, 2010

Here, we can enable the auditing on Database level.
As such we come to know which user has done what tasks and on which objects and at what time.
But for it DB has to be put in auditing mode.

Answered by: dj_dj_dj on: Jun 11th, 2009

Most simple way is to write an Insert trigger on the table which you want to get audited.

How to add data from excel sheet to Oracle database?

Asked By: ddkdhar | Asked On: Feb 16th, 2007

Answered by: sudhagargeek on: Apr 27th, 2010

Try and let me know.. surely it will help you..1. Create excel sheet and enter column name with data and save sheet as .csv (employee.csv) extension.2. Open notepad and write theose lines as follows a...

Answered by: ritikaag2002 on: Sep 29th, 2008

it can be inserted using insert statement :="insert into R1 values('"&A2&"','"&B2&"','"&C2&"','"&D2&...

How can restrict the row through view.

Asked By: Sanjay Wadatkar | Asked On: Dec 21st, 2007

1)how can restrict the view through view2)what does prior statement in PL/SQL3)what are the different pragam inPL/SQL except pragam_init,pragma_automation

Answered by: MaheshRamekar on: Jun 10th, 2009

1)How can restrict the view through view

Adding where clause

2)What does prior statement in pl/sql
Generate hierchy tree

3)What are the different Pragam inPL/sql except Pragam_init,pragma_Automation

Pragma_init - to trap the expection
pragma_automation - to execute the pl/sql block autonomusly.

Can we delete tuples in a table based on date column? And how?

Asked By: Interview Candidate | Asked On: Jul 31st, 2005

Answered by: MaheshRamekar on: Jun 10th, 2009

SQL> create table m( n number);Table created.  1* insert into m values(&1)SQL> /Enter value for 1: 1old   1: insert into m values(&1)new   1: insert into m value...

Answered by: vishnu on: Sep 5th, 2006

If you want to delete rows with given DATE

DELETE FROM TABLE_NAME WHERE DATE_COLUMN = GIVEN DATE;



If you want to delete rows >= given DATE

DELETE FROM TABLE_NAME WHERE DATE_COLUMN >= GIVEN DATE;



If you want to delete rows <= given DATE

DELETE FROM TABLE_NAME WHERE DATE_COLUMN <= GIVEN DATE;



If you want to delete rows BETWEEN DATE1 and DATE2

DELETE FROM TABLE_NAME WHERE DATE_COLUMN BETWEEN DATE1 AND DATE2;

There is a field of type character in the table, but we are storing numeric values like (roll number) in this field, so if we want to sort the field (in Java) according to numbers.How?

Asked By: sanyogkesar | Asked On: Nov 8th, 2005

By creating a function for sorting in the front end(guessing, I am not sure. Plz answer it)

Answered by: sateesh240 on: May 7th, 2009

Read character column into a PL/SQL table of numeric data type by converting to number, pass the PL/SQL table to JavaScript as a parameter, this is one way.. 

Answered by: rampratap409 on: Dec 4th, 2006

use:

select to_number(rollnumber) from tname order by to_number(rollnumber);

or

select rollnumber from tname order by to_number(rollnumber);

convert the value to integer in java

Oracle mutation error

Asked By: younaskhan40 | Asked On: Feb 7th, 2008

Please explain about mutation error in database trigger in Oracle with an example

Answered by: srinivasanram2004 on: Jul 25th, 2008

This error occurs when you try to select rows from a table and try to update the rows of the same table.  Most developers face this problem.  To avoid getting this error, create views,  select the rows from the views, and then try to update the original table rows.

Define transaction ?

Asked By: Interview Candidate | Asked On: Sep 6th, 2004

A  transaction  is  a  logical  unit of work that comprises one or more SQL statements executed by a single user.

Answered by: rajivd on: Dec 1st, 2007

Transaction is a process by which we take the database from one consistent level to another consistent level. A transaction is said to be completed only when we supply COMMIT and apply the changes to the database.

Answered by: ddkdhar on: Feb 18th, 2007

a logical unit of work that comprises dml statements or it is the time between two committs or one and one rollback

How do you connect lotus notes to Oracle database using ODBC

Asked By: hari kishore | Asked On: Apr 13th, 2007

Answered by: Bhawna on: Jul 27th, 2007

Through Dataconnections.

How to choose between indexing and partitioning , to make query faster.

Asked By: rocksteady | Asked On: Sep 21st, 2006

Answered by: praveenladdu1 on: Mar 6th, 2007

generally we use partinioning for large databases ( if a huge collection of data is there). indexing is the first most process to fast query result,

What does commit do ?

Asked By: Interview Candidate | Asked On: Sep 6th, 2004

Commit makes permanent the changes resulting from all SQL statements in the transaction. The changes made by the SQL statements of a transaction become visible   to  other  user  sessions  transactions  that  start  only  after transaction is committed.

Answered by: ddkdhar on: Feb 18th, 2007

all dml operations done previsouly makes permanent in hte database

Answered by: rampratap409 on: Dec 5th, 2006

commit ends all previous transactions by making changes permanent in the datafile ( logicaly in tables)

What is the function of optimizer ?

Asked By: Interview Candidate | Asked On: Sep 6th, 2004

The  goal of the optimizer is to choose the most efficient way to execute a SQL statement.

Answered by: sravan1 on: Dec 11th, 2006

The optimizer determines the most efficient way to use the tables and indexes to complete the request made by an SQL statement after considering many factors related to the objects referenced and the conditions specified in the query.

What is execution plan ?

Asked By: Interview Candidate | Asked On: Sep 6th, 2004

The  combinations of the steps the optimizer chooses to execute a statement is called an execution plan.

Answered by: sravan1 on: Dec 11th, 2006

The operations that the oracle server performs to execute a SQL statement.

First | Prev | | Next | Last Page

 

 

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Career Counselling

 Have Career Question?

 Ask Chandra

 Ask Only Career questions.

Follow us:
 

Latest Questions

Ads

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, click "Subscribe".