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
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
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
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
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...
How to find that when and which record inserted in the table ?
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.
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?
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...
it can be inserted using insert statement :="insert into R1 values('"&A2&"','"&B2&"','"&C2&"','"&D2&...
How can restrict the row through view.
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
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?
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...
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;
By creating a function for sorting in the front end(guessing, I am not sure. Plz answer it)
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..
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
Please explain about mutation error in database trigger in Oracle with an example
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.
A transaction is a logical unit of work that comprises one or more SQL statements executed by a single user.
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.
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
Through Dataconnections.
How to choose between indexing and partitioning , to make query faster.
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,
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.
all dml operations done previsouly makes permanent in hte database
commit ends all previous transactions by making changes permanent in the datafile ( logicaly in tables)
What is the function of optimizer ?
The goal of the optimizer is to choose the most efficient way to execute a SQL statement.
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.
The combinations of the steps the optimizer chooses to execute a statement is called an execution plan.
The operations that the oracle server performs to execute a SQL statement.
Using pivot option in SQL server 2008.
by using decode function