SELECT customer.first_name,
       customer.last_name,
       orders.order_number
FROM customer
     FULL OUTER JOIN orders ON customer.id = orders.customerid
ORDER BY customer.last_name;
            Asked
            
        
        
            Active
            
        
            Viewed 48 times
        
    -2
            
            
         
    
    
        bummi
        
- 27,123
- 14
- 62
- 101
 
    
    
        Golam Rabbani
        
- 55
- 1
- 7
- 
                    syntax wise - nothing. What happens when you run it? – dbajtr Oct 13 '17 at 13:15
- 
                    when i run it , it show nothing but error – Golam Rabbani Oct 13 '17 at 13:17
- 
                    1whats the error... – dbajtr Oct 13 '17 at 13:17
- 
                    Can you please share the error you're getting? – Mureinik Oct 13 '17 at 13:18
- 
                    Error SQL query: Documentation SELECT customer.first_name,customer.last_name,orders.order_number from customer full outer join orders on customer.id=orders.customerid ORDER by customer.last_name LIMIT 0, 25 MySQL said: Documentation #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'outer join orders on customer.id=orders.customerid ORDER by customer.last_nam' at line 3 – Golam Rabbani Oct 13 '17 at 13:19
- 
                    customer.id = orders.customer.id ??? I would need to see your table structures – Ryan Gadsdon Oct 13 '17 at 13:20
- 
                    i just wanted use full outer join with two table customer and order – Golam Rabbani Oct 13 '17 at 13:22
- 
                    2At least MySQL doesn't have FULL OUTER JOIN. – jarlh Oct 13 '17 at 13:25
- 
                    Are `Full Joins` supported? try it with a `Union` – dbajtr Oct 13 '17 at 13:25
- 
                    thanks , yeah may be mysql not support full outer join – Golam Rabbani Oct 13 '17 at 13:26
- 
                    1Possible duplicate of [MySQL FULL JOIN?](https://stackoverflow.com/questions/7978663/mysql-full-join) – dbajtr Oct 13 '17 at 13:26
1 Answers
0
            SELECT customer.first_name,customer.last_name,orders.order_number from customer full outer join orders on customer.id=orders.customerid ORDER by customer.last_name;
Nothing wrong in this query just check your column name
 
    
    
        Rahul mishra
        
- 82
- 3