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

Neon image

Serverless Postgres in 300ms (!)

10 free databases with autoscaling, scale-to-zero, and read replicas. Start building without infrastructure headaches. No credit card needed.

Try for Free →

Top comments (0)

Quickstart image

Django MongoDB Backend Quickstart! A Step-by-Step Tutorial

Get up and running with the new Django MongoDB Backend Python library! This tutorial covers creating a Django application, connecting it to MongoDB Atlas, performing CRUD operations, and configuring the Django admin for MongoDB.

Watch full video →

👋 Kindness is contagious

Explore a trove of insights in this engaging article, celebrated within our welcoming DEV Community. Developers from every background are invited to join and enhance our shared wisdom.

A genuine "thank you" can truly uplift someone’s day. Feel free to express your gratitude in the comments below!

On DEV, our collective exchange of knowledge lightens the road ahead and strengthens our community bonds. Found something valuable here? A small thank you to the author can make a big difference.

Okay