SQL – SELECT Command (to retrieve data from table/view)

Learn: How to get/get chosen sections, lines, all things considered, a column of a table/see utilizing SELECT query?

SELECT order/query is utilized to get information from the database/table. We can either get a few sections or bring a whole table. As select is a query that implies it restores a few information which is really got put away in another table called resultset.

Syntax:

SELECT column1, column2,... FROM table_name;

Here,

column1, column2,… are the name of the fields in the table.

table_name is the name of the table from which we need to get information.

SQL - SELECT Command (to retrieve data from table/view)

Queries

1. Query to get a whole table

SELECT * FROM Student;

We can likewise compose all field names rather than “*” however that would be very dull to compose the entirety of the field names.

SQL - SELECT Command (to retrieve data from table/view)

2. Query to get Enroll_No, Student_name, DOB, City

This will restore an outcome set with fields Enroll_No, Student_name, DOB, City and their information from Student.

SQL - SELECT Command (to retrieve data from table/view)

Leave a Comment

error: Alert: Content is protected!!