Tolal:174 Click:
1
2 3 4 5 6 7 8 9
SQL Interview Questions And Answers
Page 1
Ques: 1 I Have a table in which there is a chance of duplicate rows. Can you please tell me how to eliminate the dup;licate records?
Ans:
Use primary key If column is like Id or no..Alternate way is you can apply unique constraint on column.. hope u hv cleared ur doubts
Ans:
Deletion of duplicate records:
delete from emp a where a.rowid > (select min(b.rowid)
from emp b where a.rowid=b.rowid)
or
delete from table t1 where t1.rowid < (select max(t2.rowid) from table t2 where t2.<common column_name> = t1.<common column_name>)
Ques: 2 What is use of 'in' command?
Ans:
in command use suppose u want to choose department then you use in command
ex=select ename,sal from emp
where deptno in(10,20);
Ques: 3 Class members
Ques: 4 What is the Sql Wild card?
Ans:
SQL Wild Card is the bassically use for the searchign opration similarily LIKE function.SQL wildcards can substitute for one or more characters when searching for data in a database.
the following wildcards can be used:
> % - A substitute for zero or more characters
> _ - A substitute for exactly one character
> [charlist] - Any single character in charlist
> [^charlist] or [!charlist] - Any single character not in charlist
Ans:
% -
Ques: 5 Describe TO_DATE function?
Ans:
The TO_DATE function using the values when we want to be show thw timestamp from a character string that has been interpreted using a character template.
Ques: 6 In what sequence SQL statement are processed?
Ans:
The sequence of SQL statement are processed in the following sequence (DB2):
> FROM clause
> WHERE clause
> GROUP BY clause
> HAVING clause
> SELECT clause
> ORDER BY clause
> FETCH FIRST clause
Ques: 7 What databases do you know?
Ans:
Yes we know lots of Databases, we are mentioned there :
> Informix
> DB2
> SQL
> Oracle
Ques: 8 What are the main attributes of database management system?
Ans:
A database management system have a many attributes but here we are mentioned that DBMS is composed of five elements, Which is there :
> Computer hardware,
> Software,
> Data,
> People (users), and
> Operations procedures
Ques: 9 What are the main components of Database management systems software.
Ans:
The database management system software includes
many components are there, like :
> for storage management,
> concurrency control,
> transaction processing,
> database manipulation interface,
> database definition interface, and
> database control interface.
Ques: 10 What is query optimization?
Ans:
In the database many queries generate and executed or Query optimization is the part of the query process in which the database system compares different query strategies and chooses the one with the least expected cost.
Ques: 11 What Oracle lock modes do you know?
Ans:
Oracle has two lock modes :
> shared or
> exclusive.
Shared locks are set on database resources so that many transactions can access the resource.
Exclusive locks are set on resources that ensure
one transaction has exclusive access to the database resource
Ques: 12 What is Oracle locking?
Ans:
Oracle is the bassically a database Its have a many facility, taht facilities is onne of the name is locking which uses locking mechanisms to protect data from being destroyed by concurrent transactions.
Ques: 13 What does COMMIT do?
Ans:
Its manly work is Saving all changes made by DML statements.
Ques: 14 Discuss about Disadvantages of cursors?
Ans:
Many disadvantages are in Cursor which is defined here :
> Occurs network roundtrip becouse Each time we fetch a row from the cursor,; where as a normal SELECT query makes only one roundtrip, however large the resultset is.
> It is very costly because they require more resources and temporary storage. Further, there are restrictions on the SELECT statements that can be used with some types of cursors.
> Another situation in which developers tend to use cursors: we need to call a stored procedure when a column in a particular row meets certain condition. We don't have to use cursors for this. This can be achieved using WHILE loop, as long as there is a unique key to identify each row.
Ques: 15 What is RAID and what are different types of RAID configurations?
Ans:
Redundant Array of Inexpensive Disks is abriviation of RAID, It is maily use for providing the facility of fault tolerance to database servers. There are six RAID levels 0 through 5 offering different levels of performance, fault tolerance.
Ans:
Redundant Array of Inexpensive Disks is abriviassion of RAID, Its mainly use for providing the facility for fault tolerance to database servers. There are six RAID levels 0 through 5 offering different levels of performance, fault tolerance.
Ques: 16 What do you mean by Serialized?
Ans:
It is the part of the isolation level , Its bassically use for the Data read by the current transaction cannot be changed by another transaction until the current transaction finishes. No new data can be inserted that would affect the current transaction.
Ques: 17 What do you mean by Repeatable Read?
Ans:
It is the defined bassically a isolation properties and its works on the Isolation level as a Data read by a current transaction cannot be changed by another transaction until the current transaction finishes. Any type of new data can be inserted during a transaction.
Ques: 18 What do you mean by Read Committed?
Ans:
t is the bassically defined as a Isolation properties , It is using for the tracsaction, which is A transaction cannot read data that is being modified by another transaction that has not committed. This is the default isolation level in Microsoft SQL Server.
Ques: 19 What do you mean by Read Uncommitted?
Ans:
First of all I Would like to tell every one its a Type of Isolation Level , It is the mainly use for the transaction, which transaction can read any data, even if it is being modified by another transaction. This is the least safe isolation level but allows the highest concurrency.
Ques: 20 What is a Cartesian product?
Ans:
A Cartesian product is bassically use for the results from a faulty query. It is a row in the results for every combination in the join tables.
Goto Page:
1
2 3 4 5 6 7 8 9
SQL Objective
SQL Objective Questions And Answers
SQL Interview Questions And Answers
SQL Subjective Questions And Answers
R4R,SQL Objective, SQL Subjective, SQL Interview Questions And Answers,SQL,SQL Interview,SQL Questions ,SQL Answers