SQL SELECT StatementIn SQL, the SELECT statement is used to query or retrieve data from a table in the database. The returns data is stored in a table, and the result table is known as result-set. Syntax Here, the expression is the field name of the table that you want to select data from. Use the following syntax to select all the fields available in the table: Example: EMPLOYEE
To fetch the EMP_ID of all the employees, use the following query: Output
To fetch the EMP_NAME and SALARY, use the following query:
To fetch all the fields from the EMPLOYEE table, use the following query: Output
Next TopicDBMS SQL Insert
|