When we give SELECT * FROM EMP; How does oracle respond?
Answers were Sorted based on User's Feedback
Answer / vaibhavi_dixit
When the above statment is fired, Oracle checks for
following things,
1.Syntax Correctness.
2.User Priviledges on Emp Table.
If the above two things are correct then, all columns and
all rows from Emp table are selected in an Implicit area
and then are send to User.
Cheers
VD
Is This Answer Correct ? | 73 Yes | 3 No |
Answer / rahul vishwakarma
When we execute this command then the Oracle engine start
the process and terieve the values and store them in
IMPLICIT CURSOR then the values from this cursor are send
to the user panel
Is This Answer Correct ? | 27 Yes | 9 No |
Answer / nagender k
It will retrieve all the columns from emp table.
Is This Answer Correct ? | 21 Yes | 6 No |
Answer / rameshg123
Phases of SQL Statement(Select Statement)
Ans: 1. Open the cursor
2. Parse the statement
During parsing, the SQL statement is
passed from the user process to Oracle and a parsed
representation of the SQL statement is loaded into a shared
SQL area. Many errors can be caught during this phase of
statement processing. Parsing is the process of
• translating a SQL statement, verifying it to be a
valid statement
• performing data dictionary lookups to check table
and column definitions
• acquiring parse locks on required objects so that
their definitions do not change during the statement's
parsing
• checking privileges to access referenced schema
objects
• determining the optimal execution plan for the
statement
• loading it into a shared SQL area
• for distributed statements, routing all or part of
the statement to remote nodes that contain referenced data
A SQL statement is parsed only if a shared SQL area for an
identical SQL statement does not exist in the shared pool.
In this case, a new shared SQL area is allocated and the
statement is parsed
Although the parsing of a SQL statement validates that
statement, parsing only identifies errors that can be found
before statement execution
3. Query process
• require read consistency
• can use temporary segments for intermediate
processing
• can require the describe, define, and fetch phases
of SQL statement processing
4. Describe Results
The describe phase is only necessary if the
characteristics of a query's result are not known; for
example, when a query is entered interactively by a user.
In this case, the describe phase is used to determine the
characteristics (datatypes, lengths, and names) of a
query's result.
5. Defining Output
In the define phase for queries, you specify the
location, size, and datatype of variables defined to
receive each fetched value. Oracle performs datatype
conversion if necessary.
6. Bind Any Variables
7. Execute the Statement
8. Parallelize the Statement
When using the parallel query option, Oracle can
parallelize queries and certain DDL operations.
Parallelization causes multiple query servers to perform
the work of the query so that the query can complete
faster. Index creation and creating a table with a subquery
can also be parallelized
9. Fetch Rows of a Query Result
In the fetch phase, rows are selected and ordered
(if requested by the query), and each successive fetch
retrieves another row of the result, until the last row has
been fetched.
Is This Answer Correct ? | 15 Yes | 3 No |
Answer / gvprasad
The oracle engine will execute the command,and retrives all
the data from the database and give it to the end user.
Is This Answer Correct ? | 23 Yes | 13 No |
Answer / ch. nageswar subudhi
Hi All,
When we'll excute any type of Query or SELECT statment in
the SQL prompt. There are some steps proceed through which
we'll get proper results. These steps are given belows
1. After write the Query
2. First it Parses according to their priority. (i.e Check
the Correct syntax)
3. Binding the variables
4. Fetch for proper data from proper table or not
5. Execute the whole query
6. Finally u'll got OUTPUT.
Regards\
Nageswar
Is This Answer Correct ? | 12 Yes | 3 No |
Answer / chinna
Hi
When we give this command select * from Emp; It will
display emp table from oracle in database program.
Is This Answer Correct ? | 18 Yes | 11 No |
Answer / radha sri seshu.kolla
when we fire select * from emp; first oracle engine checks
the data dictionary called user_tables. if the table emp
existed then it checks all permissions then contacts the
data dictionary called user_tab_columns, and according to
the given condition the sql statement will be executed
Is This Answer Correct ? | 9 Yes | 2 No |
Answer / senthil vinayagam
Full table scan of emp occurs and all the records from
emp is displayed
Is This Answer Correct ? | 11 Yes | 5 No |
Answer / vinay dixit
Oracle search for this table in the database and returns
all the rows.
Is This Answer Correct ? | 6 Yes | 2 No |
Can we interchange parameters in procedure while calling
what is single byte over head in oracle..?
what is a control file ? : Sql dba
What are the various restrictions imposed on view in terms of dml?
What are synonyms in sql?
What is serial sql?
what does myisamchk do? : Sql dba
how to convert numeric values to character strings? : Sql dba
Is sql a dbms?
Is primary key an index?
is mysql query is case sensitive? : Sql dba
What is Difference Between Unique and Primary Key Constraints?