DEV Community

Cover image for SQL Select Query
Baransel
Baransel

Posted on

3 2

SQL Select Query

Sign up to my newsletter!.

SELECT Query

SELECT * FROM students
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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.

Students table

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.

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay