Posts

Showing posts with the label statement

SQL Show Execution Plan of SQL Statement SHOWPLAN ALL

SQL Show Execution Plan of SQL Statement SHOWPLAN ALL --show the execution plan of any statement --set Showplan_all OFF OR ShowPlan_text ON--Then Run your query check and set the Showplan to OFF --Syntax SET SHOWPLAN_ALL { ON OFF } --Example SET SHOWPLAN_ALL ON--Table is not created ,only download  file  now

SQL SELECT statement

SQL SELECT statement Description The SQL SELECT statement is used to retrieve records from one or more tables in your SQL database. Syntax The syntax for the SQL SELECT statement is: SELECT expressions FROM tables WHERE conditions; Parameters or Arguments expressions are the columns or calculations that you wish to retrieve. tables are the tables that you wish to retrieve records from. There must be at least one table listed in the FROM clause. conditions are conditions that must be met for the records to be selected. Example - Select all fields from one table Lets look at an example showing how to use the SQL SELECT statement to select all fields from a table. SELECT * FROM suppliers WHERE city = Newark ORDER BY city DESC; In this SQL SELECT statement example, weve used * to signify that we wish to view all fields from the suppliers table where the supplier resides in Newark. The result set is sorted by city in descending order. Example - Select individual fields from one table ...