June 2, 2019

Srikaanth

Baidu Oracle Interview Questions Answers

Baidu Most Frequently Asked Latest Oracle Interview Questions Answers

Explicit Cursor Attributes

There are four cursor attributes used in Oracle

cursor_name%Found,
cursor_name%NOTFOUND,
cursor_name%ROWCOUNT,
cursor_name%ISOPEN

How Do I Display Row Number With Records?

To achive this use rownum pseudocolumn with query, like
SQL> select rownum, ename from emp;

Output:
-----------------
1 Scott
2 Millor
3 Jiyo
4 Smith

What Is The Difference Of A Left Join And An Inner Join Statement?

A LEFT JOIN will take ALL values from the first declared table and matching values from the second declared table based on the column the join has been declared on. An INNER JOIN will take only matching values from both tables
Baidu Most Frequently Asked Latest Oracle Interview Questions Answers
Baidu Most Frequently Asked Latest Oracle Interview Questions Answers

What Is An Advantage To Using A Stored Procedure As Opposed To Passing An Sql Query From An Application.

A stored procedure is pre-loaded in memory for faster execution. It allows the DBMS control of permissions for security purposes. It also eliminates the need to recompile components when minor changes occur to the database.

What Is A Cartesian Product? What Causes It?

A Cartesian product is the result of an unrestricted join of two or more tables. The result set of a three table Cartesian product will have x * y * z number of rows where x, y, z correspond to the number of rows in each table involved in the join. It is causes by specifying a table in the FROM clause without joining it to another table.

Why Is A Union All Faster Than A Union?

The union operation, you will recall, brings two sets of data together. It will *NOT* however produce duplicate or redundant rows. To perform this feat of magic, a SORT operation is done on both tables. This is obviously computationally intensive, and uses significant memory as well. A UNION ALL conversely just dumps collection of both sets together in random order, not worrying about duplicates.

What Are Some Advantages To Using Oracle's Create Database Statement To Create A New Database Manually?

You can script the process to include it in a set of install scripts you deliver with a product.

You can put your create database script in CVS for version control, so as you make changes or adjustments to it, you can track them like you do changes to software code.

You can log the output and review it for errors. You learn more about the process of database creation, such as what options are available and why.

What Are The Pros And Cons Of Using Triggers?

A trigger is one or more statements of SQL that are being executed in event of data modification in a table to which the trigger belongs.

Triggers enhance the security, efficiency, and standardization of databases.

Triggers can be beneficial when used:

to check or modify values before they are actually updated or inserted in the database. This is useful if you need to transform data from the way the user sees it to some internal database format.
to run other non-database operations coded in user-defined functions
to update data in other tables. This is useful for maintaining relationships between data or in keeping audit trail information.


to check against other data in the table or in other tables. This is useful to ensure data integrity when referential integrity constraints aren’t appropriate, or when table check constraints limit checking to the current table only.

Switch To Dos Prompt

SQL> host

How To Access The Current Value And Next Value From A Sequence? Is It Possible To Access The Current Value In A Session Before Accessing Next Value?

Sequence name CURRVAL, sequence name NEXTVAL. It is not possible. Only if you access next value in the session, current value can be accessed.

What Is A Database Link?

Database link is a named path through which a remote database can be accessed.

If Unique Key Constraint On Date Column Is Created, Will It Validate The Rows That Are Inserted With Sysdate?

It won’t, Because SYSDATE format contains time attached with it.

How Will You Activate/deactivate Integrity Constraints?

The integrity constraints can be enabled or disabled by ALTER TABLE ENABLE CONSTRAINT / DISABLE CONSTRAINT.

Where The Integrity Constraints Are Stored In Data Dictionary?

The integrity constraints are stored in USER_CONSTRAINTS.

What Are The Pre-requisites To Modify Datatype Of A Column And To Add A Column With Not Null Constraint?

- To modify the datatype of a column the column must be empty.
- To add a column with NOT NULL constrain, the table must be empty.

How Many Long Columns Are Allowed In A Table? Is It Possible To Use Long Columns In Where Clause Or Order By?

Only one LONG column is allowed. It is not possible to use LONG column in WHERE or ORDER BY clause.

https://mytecbooks.blogspot.com/2018/10/baidu-most-frequently-asked-latest.html
Subscribe to get more Posts :