DEV Community

Durga Pokharel
Durga Pokharel

Posted on

1 1

Day 28 Of 100DaysOfCode: SQL Join Operation

Today I learned more about relational database. Also worked on SQL. Did the operation like SQL insert, SQL delete, SQL update, sorting with ORDER by. Also learned basic of database model, database design, building a database model.

Worked on table having multiple column, learned about relational power and join operation using (ON, without ON). I learned these from Coursera.

SQL Join Operation

SQL uses the JOIN clause to reconnect tables. In the JOIN clause we specify the fields that are used to reconnect the rows between the tables.

The following is an example of a SELECT with a JOIN clause:

SELECT * FROM Follows JOIN People
    ON Follows.from_id = People.id WHERE People.id = 1
Enter fullscreen mode Exit fullscreen mode

The JOIN clause indicates that the table1 we are selecting cross both the table1 and table2 tables. The ON clause indicates how the two tables are to be joined: Take the rows from table1 and append the row from table2 where the field from_id in table1 is the same the id value in the table2 table.


Day 28 of #100DaysOfCode and #pythoncode
* Learned about relational database
* More about SQL
* SQL insert, delete, update, select, sorting with ORDER by
* The join operation#100DaysOfCode, #CodeNewbie , #beginner pic.twitter.com/Lwxxr6BXZ6

— Durga Pokharel (@mathdurga) January 21, 2021

AWS Q Developer image

Your AI Code Assistant

Generate and update README files, create data-flow diagrams, and keep your project fully documented. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Get started free in your IDE

Top comments (0)

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

👋 Kindness is contagious

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

Okay