Tuesday, January 25, 2022

[FIXED] My INNER JOIN SQL command yields no results

Issue

I try to make a query using the INNER JOIN command and it executes successfully but it yields no results. Here is the SQL code I am using:

SELECT * FROM `departament` INNER JOIN `fakultet` 
ON "departament.#ID_Fakultet"="fakultet.ID_Fakultet"

And here are the tables the departament table:

enter image description here

the fakultet table

enter image description here


Solution

if you write in double (" ") or single (' ') quotes it will take as string.

SELECT * FROM `departament` INNER JOIN `fakultet` 
    ON departament.`#ID_Fakultet`=fakultet.`ID_Fakultet`

can you run this query?



Answered By - krishn Patel

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.