DEV Community

Cover image for SQL Conceptual Basics
Hunt Navar
Hunt Navar

Posted on

SQL Conceptual Basics

Today I will discuss the basics of SQL or Structured Query Language and why it might be important to learn if you are working to be a developer. SQL "databases" are tables. These tables can either be looked at as a bunch of rows on top of one another, or several columns smashed together. Image description
As a developer, we are interested in accessing and using the data stored within our SQL tables. This is when our first keyword comes into play, Select. A good analogy for Select is that it takes an item (column) from our shopping cart (table) and puts it into our basket.
Image description
The next keyword that is important is From. From specifies the specific table we want to Select our columns from.
Image description
As you can see we have eliminated our yellow column from our table and condensed our data. This is the first step in having usable information.

The next keyword to utilize for even MORE usable data is the Where keyword. The Where keyword allows us to filter out specific rows that might contain information we do not want.

Image description
In this instance the Where keyword is being used to select the blue columns. We are then filtering out all red elements with <> which translates to "Does Not Equal".
Image description
This is extremely useful to collect good or bad data and then store it for use at another time!

The final keyword we will discuss today is the Join keyword. The Join keyword allows for two tables to be selected and then joined together. It is important that when you are joining tables, the data types for columns being join match one another.
Image description
Then the final outcome of the joined tables would look like:
Image description
This was my intro into SQL basics! Thanks for the read.
Sources: https://www.w3schools.com/sql/sql_intro.asp
Sources: https://www.c-sharpcorner.com/article/introduction-to-sql-and-sql-commands/
Sources: https://www.sqlshack.com/introduction-to-sql/
Sources: https://www.youtube.com/watch?v=bEtnYWuo2Bw

Discussion (0)