Hi,
How to use foreign key with join queries. I have used the query
SELECT first_name,last_name,user_email from Info,Registry WHERE user_id='1';
where user_id = foreign key
first_name,last_name are in table Info
user_email in table Registry
user_id is a foreign key which references the parent key present in seperate database.
. The query is returning empty set even though there are results in mysql table.
What is the reason for this. Can anyone help me.
Thanks
2 1232
Hi,
How to use foreign key with join queries. I have used the query
SELECT first_name,last_name,user_email from Info,Registry WHERE user_id='1';
where user_id = foreign key
first_name,last_name are in table Info
user_email in table Registry
user_id is a foreign key which references the parent key present in seperate database.
. The query is returning empty set even though there are results in mysql table.
What is the reason for this. Can anyone help me.
Thanks
Hi,
u've written that the user_id is in a separate database, then how u r linking the tables info and registry. to perform a join there should b atleast one column in common, but u'ven't used to common column in query. may b that's the pbm.
regards,
vijay
Hi,
How to use foreign key with join queries. I have used the query
SELECT first_name,last_name,user_email from Info,Registry WHERE user_id='1';
where user_id = foreign key
first_name,last_name are in table Info
user_email in table Registry
user_id is a foreign key which references the parent key present in seperate database.
. The query is returning empty set even though there are results in mysql table.
What is the reason for this. Can anyone help me.
Thanks
Hi,
u've written that the user_id is in a separate database, then how u r linking the tables info and registry. to perform a join there should b atleast one column in common, but u'ven't used to common column in query. may b that's the pbm.
regards,
vijay
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Marek Lewczuk |
last post by:
Hello,
I have a strange problem, maybe some of you will be able to explain me
something. I use LEFT JOIN as a substitute for subselects. It's true
that many subselects can be rewriten using LEFT...
|
by: Paul Bramscher |
last post by:
Here's one for pathological SQL programmers.
I've got a table of things called elements. They're components, sort of
like amino acids, which come together to form complex web pages -- as
nodes...
|
by: Rowan |
last post by:
Hello,
I am having a problem with a join. Either I am just not seeing the
obvious, it isn't possible, or I need to use a different approach. I
have an application with a vsflexgrid that needs...
|
by: Justin |
last post by:
Hello,
I have a scenario where I have unique identifiers in about 25 tables,
each table has varying fields - eg.
Table #1 Table #2 Table #3 Table #4
--------- ...
|
by: PW |
last post by:
I've created an ASP application which uses an Access database.
I've created an outer join query, but for some reason the "Property_Def"
column is not aligning with the "ESPN" column. They should...
| |
by: Dot Net Daddy |
last post by:
Hello,
I have set up a database for movies. In one table (Movies) I have
movie names, and production years, and also genres. In another table
(Directors), I keep the directors and the movies...
|
by: Simon Gare |
last post by:
Hi all,
having problem with query below
SELECT DISTINCT dbo.logon.DRIVER_NO, dbo.booking_form.DriverNo FROM
((dbo.logon RIGHT JOIN dbo.Employees ON dbo.logon.DRIVER_NO =...
|
by: teser3 |
last post by:
I have 3 Access 2003 tables:
TableMain
MID PO TE INFO
1 2 3 ABC
2 2 1 EREER
3 1 3 OIUOI
4 3 3 PERE
5 2 2 DFE
|
by: gubbachchi |
last post by:
Hi,
How to use foreign key with join queries. I have used the query
SELECT first_name,last_name,user_email from Info,Registry WHERE user_id='1';
where user_id = foreign key
...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |