SQL left join

Now there are two tables
The A table
AID ANo ATime
1 1 2013-06-10
1 1 2013-06-11
2 2 2013-06-11

The B table
BID BNo BName
1 1 yy
1 1 nn
3 3 ss

Now I show the following data

AID ANo ATime BName
1 1 2013-06-10 yy
1 1 2013-06-11 nn
2 2 2013-06-11 null
How to realize the

Started by Hubery at February 03, 2016 - 1:37 PM

Unless the fields increase the unique identification

Posted by Merlin at February 05, 2016 - 1:51 PM

Your data can not get the results you want

Posted by Doris at February 12, 2016 - 2:25 PM

If the A table into the following
AID ANo ATime Bianhao
1 1 2013-06-10 222
1 1 2013-06-11 345
2 2 2013-06-11 45

How to write a SQL statement

Posted by Hubery at February 25, 2016 - 2:48 PM

Table B add a field that uniquely identifies the
BID BNo BName
1 1 yy
1 1 nn
3 3 ss

Posted by Lou at November 26, 2016 - 9:12 AM

Only A table

Posted by Hubery at November 27, 2016 - 9:43 AM

The first row of table A and table B not only the first matching

Posted by Doris at December 09, 2016 - 9:48 AM

If you add only marked words in the B table
How to write a SQL statement

Posted by Hubery at December 24, 2016 - 10:24 AM

After the increase, how to write a SQL statement

Posted by Hubery at December 30, 2016 - 10:57 AM

If so, it is recommended to use the program to achieve, open A, B respectively, and then the corresponding output. The poor efficiency of SQL.

Posted by Louisa at January 04, 2017 - 12:43 PM

Requirements can not write this, or have already achieved

Posted by Hubery at January 07, 2017 - 12:14 PM

This no foreign built with primary keys corresponding, should make uncertain.

Posted by Carry at January 09, 2017 - 11:54 AM

Forced love does not last

Posted by Oswald at January 13, 2017 - 12:05 PM

The A table
AID ANo ATime acode
1 1 2013-06-10 1
1 1 2013-06-11 2
2 2 2013-06-11 3

The B table
BID BNo BName bcode
1 1 yy 1
1 1 nn 2
3 3 ss 3
Acode and BCODE correspondence and no duplicate values can be

Posted by Robert at January 15, 2017 - 1:24 PM