SELECT Query
SELECT * FROM students
This command is used to query all the data in the Students table, by typing all the columns in that table instead of *
, we get them all.
SELECT
id
,name
,surname
,quiz
,midterm
,final
,class_no
FROM students
We need to specify the column names with commas after the SELECT statement.
FROM
indicates where, *
indicates all data, SELECT
indicates what to do with the obtained data. SELECT
is used to select data from that table. If we write the column names specified in the table instead of *
, it returns only the information in that column.
In our example, there are id
, name
, surname
, quiz
, midterm
, final
, class_no
columns in the Students table. A total of 7 data has been entered in this table. The first line shows the record with id
1 and name surname Baransel Arslan.
If we want to bring all the information in the name
column in the Students table;
Continue this post on my blog! SQL Select Query.
Top comments (0)