What is the order in which the SQL query is executed? list
them in order.
Answers were Sorted based on User's Feedback
Answer / ela tiku
At runtime the compiler first takes the table name from
where the data is to be retrieved (FROM <tablename>), then
it checks for the condition (Where <condition>) then it
selects the values to me displayed as o/p
| Is This Answer Correct ? | 6 Yes | 1 No |
Answer / nandkumar karlekar
The order of Execution is as follows
1.From clause and joins
2.independent subqueries in the where clause
3.where clause last condition execute first but if the
index is present then these condiyions execute first
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / l. meher
When a SQL query is getting executed it goes through the
following steps:
1) It goes to the shared pool which contains information
such as the parse tree and execution plan for the
corresponding statement.
2)Validate the SQL statement.
3)Validate the source.
4)Acquire locks.
5)Checks for previllages.
6)Parse the statement.
7)Execute the Query.
8)Fetch the value (only for select statement).
9)Generate the redo information.
If you have any doubt mail me at lmeher.tcs@gmail.com
Thanks..
| Is This Answer Correct ? | 5 Yes | 4 No |
Answer / selvam
FROM
ON
JOIN
WHERE
GROUP BY
HAVING
SELECT
DISTINCT
ORDER BY
TOP
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / suraj
Though it's not so clear on what type of SQL query.
If we want to see in what order does the SELECT query
executes; it'l like this.
SELECT .........
FROM ..........
WHERE ..........
GROUP BY ...........
HAVING ............
| Is This Answer Correct ? | 6 Yes | 6 No |
One table Test with single column. These are the values in the table a b c d e f g h I need a query (without using any variable) with output as - a b c d f f g h
what is sql server? : Sql server database administration
How to recover from sql injection? : sql server security
How to install sql server 2005 express edition?
Which table keeps information about stored procedures?
What is importing utility?
What is meant by indexing?
How to insert a new row into a table with "insert into" statements in ms sql server?
What are the steps you must follow to hide sql server instances?
Define primary key?
How create table structure only from tableA to TableB if TableA have some data?
Diff between Composite key, Alternate Key, Candidate Key, Primary Key, Unique Key, Super Key, Foreign Key
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)