SQL Select vs Multiple Tables

I just completed the Codeacademy SQL Fundamentals course: https://www.codecademy.com/paths/data-analyst/tracks/dsf-learn-sql/modules/dsf-review-sql/informationals/review-fundamentals-of-sql

I want to make sure I understand the difference between queries and manipulation:
When I use the SELECT command, I am only changing how the tables look temporarily, to run an analysis or get some kind of results. But, I’m not actually changing or manipulating the tables.

When I use the commands JOIN or UNION… those are also only temporary ways to view tables in a combined fashion, correct?

So: how do I convert these SELECT commands and update the tables I’m working on? If I understand correctly, this would be with the CREATE TABLE, INSERT, ALTER TABLE, DELETE and UPDATE commands. So: if I use these, than I’m manipulating and changing the actual tables. Is this correct?

Thank you for your support.

Cheers,

1 Like

You’re not changing the tables. You’re selecting rows of information from the tables based on whatever conditions you apply in your query.

Yes

Yep. You’re changing the existing structure of tables in a DB.

If they are available, I would suggest downloading the SQL Cheatsheets for reference.

1 Like

Thank you! Yes, I’ve got the cheatseets bookmarked. Just wanted to double check I was understanding the difference correctly.

2 Likes