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.
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.
The next keyword that is important is From. From specifies the specific table we want to Select our columns from.
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.
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".
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.
Then the final outcome of the joined tables would look like:
This was my intro into SQL basics! Thanks for the read.