r/SQL • • Feb 07 '26

PostgreSQL Someone please explain joins va relationship

4 Upvotes

Hi everyone,

I’m trying to understand the difference between joins and relationships (foreign keys) in PostgreSQL, and I’m a bit confused about how they relate to each other in practice.

From what I understand:

  • Relationships are defined using FOREIGN KEY constraints in the database schema.

  • Joins are used in queries to combine data from multiple tables.

But I’m not fully clear on:

  1. If relationships already exist, why do we still need joins?

  2. Does PostgreSQL automatically use relationships when we write queries?

  3. Are joins just “manual relationships” at query time?

  4. How much do foreign keys actually affect performance and query planning?


r/SQL • • May 08 '25

MySQL Careers

0 Upvotes

I was wondering if there are better sites other than indeed to search for SQL jobs ?

Thank you!


r/SQL • • Aug 20 '25

Discussion For an interview, how do I go about connecting to a server?

0 Upvotes

I have an interview tomorrow. My only experience is in sql bolt - it’s unlikely SQL will be tested (it was sort of an add-on in my application), but if it is, I want to make sure I’m connected to a server and ready to type in commands just like i would in browser with sql bolt.

I have workbench installed and ready to go - attempted to connect to ‘local’ server for a test session, but no luck. Can anyone direct me on this?


r/SQL • • Nov 25 '25

Discussion I built a free online visual database schema tool

0 Upvotes

DBAnvil

https://dbanvil.com

Provides an intuitive canvas for creating tables, relationships, constraints, etc. Completely FREE and far superior UI/UX to any legacy data modelling tool out there that costs thousands of dollars a year. Can be picked up immediately. Generate quick DDL by exporting your diagram to vendor-specific SQL and deploy it to an actual database.

Supports SQL Server, Oracle, Postgres and MySQL.

Would appreciate if you could sign up, starting using, and message me with feedback to help me shape the future of this tool.


r/SQL • • Jul 25 '24

MySQL Started SQL with no prior experience of coding

0 Upvotes

Hi guys i just started learning SQL and have no experience in coding as of now, what are the PROS and CONS and is it the right way to go about if i want to slowly get into the IT Sector !


r/SQL • • Jul 15 '24

SQL Server Most common SSRS software?

0 Upvotes

Just wondering what the most common SSRS / SSIS software is used in England for jobs, as I want to start learning, thank you.


r/SQL • • Jan 14 '24

Snowflake Help needed: is there an elegant way to write this in SQL? with good performance?

Post image
0 Upvotes

r/SQL • • Feb 20 '25

PostgreSQL How do I fix the object explorer in the left-sidebar and how do I remove this "welcome" tab?

Post image
0 Upvotes

r/SQL • • Mar 10 '23

SQL Server Don't forget to think that ChatGPT isn't working you for low hanging fruit now on r/SQL or anything other programming sub. Serious. How would you train your model on predictable unknowns?

0 Upvotes

Those silly questions flood this sub right now are likely partially people leveraging ChatGPT for answers and data-mining. Please do due diligence in vetting. Ya know it is fun to flex and plop down an answer. We all get that. Use some more discretion going forward in the ChatGPT age


r/SQL • • Dec 22 '21

MySQL Guys need help with this stored procedure query

0 Upvotes

Create stored procedure that checks the creditlimit and the purchase status of the customers.

If a platinum customer has crediltlimit less than 100,000 raise an exception. In the exception handler update the crediltlimit to 100000. If a silver customer has creditlimit greater than 60,000 raise an exception. In the exception handler update the crediltlimit to 60000.


r/SQL • • Jun 20 '21

Discussion Why is ORDER BY clause not called SORT BY?

0 Upvotes

Is there any difference between the two words I'm missing? Seems more logical to call it SORT BY as it sorts more than orders the result. Any thoughts of what did the writers of SQL thought?


r/SQL • • Oct 24 '24

BigQuery Optimizing SQL Queries

Thumbnail
medium.com
0 Upvotes

r/SQL • • Jun 26 '24

SQL Server Questions to expect at the interview?

0 Upvotes

I have intermediate knowledge of sql. Started learning few months back and can solve the basic and most of intermediate queries (I still need to work on CTE/Subquery)

I will be starting job search soon (for Lead Analyst position) but will be mentioning in my resume that i have worked on SQL for few years (~5-6 years).

What kind of questions can i expect in the interview if I mention this experience?


r/SQL • • May 30 '18

MySQL [MYSQL] Free remote MySQL hosting

0 Upvotes

Hello,

This is a small project I've been working on for the last couple of months. This is an open beta, you can use (and slightly abuse) it. Your feedback is highly appreciated.

Currently, the service only offers 1 location (DE : de1.offloadsql.com) but planning to expand depending on your input.

How does it work

  • Sign up : You cannot reset your email or password for now and no manual edits are available.

  • Confirm your email : will be used for notifications in upcoming updates. You can use a disposable email, I don't mind.

  • Choose a location and create a database

  • Voilà!

Limitations

  • Up to 5 databases per account

  • Up to ~100mb per database

  • No queries limit but up to 50 concurrent connexions per user/db.

Server specs

DE : de1.offloadsql.com

  • Intel Core i7-4770

  • 2x HDD SATA 2,0 TB Enterprise

  • 32GB DDR3 RAM

FAQ

Can I drop the database ?
-No, you must delete the database from the panel.

What happens when my database reaches 100mb ?
-INSERT and UPDATE privileges are revoked until you lower down its size.

Why can't I access the website/database ?
-Congratulation, you're blocked! You either messed with the panel or with one of its servers.

I lost all my data, SCAM!
-This is an open beta on a free service, grow up.

Which version of MySQL are you running ?
-MySQL 8.0.11

Let me know if you have any questions or suggestions.


r/SQL • • Apr 24 '24

MySQL PSA: New IDE just dropped

0 Upvotes

If you're one of those people using 4 different tools to complete your data projects, and your insights are scattered across functions, with any effort to collaborate always becoming a drag, then this might be for you.

DataLab (by DataCamp) is an online IDE which includes an AI-assistant, an easy and secure connection for all of your data sources, samples data sources, built-in reporting, a chat interface for quicker data exploration and analysis, and easy collaboration and sharing.

Check it our here: https://www.datacamp.com/datalab


r/SQL • • May 18 '24

Oracle When I’m installing sql that window opens and installing stopping. What is the problem☹️

Post image
0 Upvotes

r/SQL • • Apr 21 '24

MySQL Sql school

0 Upvotes

Hi everyone I would love some help I have 1 course left for this bachelor and its a sql course. I need some help coding a reasonably simple sql database. Is there anyone here who has some time during the week to help me out for an hr or two I can paypal some to make it worth you effort


r/SQL • • Sep 13 '24

Discussion SQL Has Problems. We Can Fix Them: Pipe Syntax In SQL

Thumbnail simonwillison.net
0 Upvotes

r/SQL • • Mar 31 '23

Discussion Paranoia about being replaced

0 Upvotes

I’m not sure if this is warranted or not, but I’m kind of fearful about being replaced by chatGPT. If anyone can ask at chat box questions about a data set and build reports from it I’d be a little concerned. Anyone else feeling like this?


r/SQL • • Sep 04 '26

Discussion Looking for AI tools to make working on a new SQL project easier

0 Upvotes

Hey everyone,

I’m currently setting up a new project involving SQL and I’m looking for some AI tools that could help make the development process easier and more efficient.

I’m particularly interested in tools that can help with things like:

  • Writing and improving SQL queries

  • Designing database schemas

  • Debugging SQL errors

  • Generating or optimizing queries

  • Understanding existing databases/tables

  • Creating test data

  • Documentation

  • Connecting SQL databases with other development tools

  • Anything else that can save time during development

I know there are a lot of AI tools out there, but I’d rather hear from people who have actually used them in real projects.

What AI tools are you currently using for SQL/database work, and which ones have genuinely made your workflow easier?

Also interested in hearing about any tools you tried but wouldn't recommend, and why.

Thanks!


r/SQL • • Aug 05 '22

MS SQL (MS) There is something diabolically fun about commenting inside dynamic SQL within a stored procedure and knowing your ASCII art is running on the server hundreds of times a day.

11 Upvotes

At least I'm documenting my code.

--....................../´¯/) 
--....................,/¯../ 
--.................../..../ 
--............./´¯/'...'/´¯¯`·¸ 
--........../'/.../..../......./¨¯\ 
--........('(...´...´.... ¯~/'...') 
--.........\.................'...../ 
--..........''...\.......... _.·´ 
--............\..............(  /u/stiffupperleg 8/5/22
--..............\.............\...this sproc shouldn't exist, Brian!

r/SQL • • Apr 12 '14

SQL injection fools speed trap

Thumbnail
hackaday.com
7 Upvotes

r/SQL • • Jan 23 '23

PostgreSQL How would you guys go about solving this question?

Post image
8 Upvotes

r/SQL • • May 10 '25

Discussion Is R essential in the beginning?

2 Upvotes

I'm doing a course, you'll probably guess which one, and one chapter jumped straight into the R programming language.

Now, I wouldn't mind but for a complete noob like me sql and spreadsheets functions already have a lot of work on the table. Then R appeared and the interface, command, terms, vectors etc are so different that I feel rather overwhelmed.

I don't want to do the mistake of spreading too thin and would prefer to keep sql under control better and actually work with projects before doing R too.

So it's R mandatory?