diff --git a/src/Lunr/Gravity/Database/DMLQueryBuilderInterface.php b/src/Lunr/Gravity/Database/DMLQueryBuilderInterface.php
index ca041927ce2ba5ec86cf947c033ce8829faa5d6b..e1045b328a17614419e097f996455a2062848ac0 100644
--- a/src/Lunr/Gravity/Database/DMLQueryBuilderInterface.php
+++ b/src/Lunr/Gravity/Database/DMLQueryBuilderInterface.php
@@ -443,11 +443,11 @@ interface DMLQueryBuilderInterface
      * Define a UNION or UNION ALL clause of the SQL statement.
      *
      * @param string $sql_query SQL query reference
-     * @param bool   $all       True for ALL or False for empty (default).
+     * @param string $type      Type of UNION operation to perform.
      *
      * @return DMLQueryBuilderInterface $self Self reference
      */
-    public function union($sql_query, $all = FALSE);
+    public function union($sql_query, $type);
 
     /**
      * Define the lock mode for a transaction.
diff --git a/src/Lunr/Gravity/Database/DatabaseDMLQueryBuilder.php b/src/Lunr/Gravity/Database/DatabaseDMLQueryBuilder.php
index 621fa1a63924c86be87d70d1877aad9107e93fec..156ce2c0e44e50abd1d5245df7b97e54ffa765d0 100644
--- a/src/Lunr/Gravity/Database/DatabaseDMLQueryBuilder.php
+++ b/src/Lunr/Gravity/Database/DatabaseDMLQueryBuilder.php
@@ -808,16 +808,25 @@ abstract class DatabaseDMLQueryBuilder implements DMLQueryBuilderInterface
      * Define a compound clause for the SQL statement.
      *
      * @param string $sql_query Left expression
-     * @param string $base      Whether to construct UNION, EXCEPT or INTERSECT
+     * @param string $type      Whether to construct UNION, EXCEPT or INTERSECT
+     * @param mixed  $operator  Whether to add ALL, DISTINCT or default
      *
      * @return void
      */
-    protected function sql_compound($sql_query, $base)
+    protected function sql_compound($sql_query, $type, $operator = NULL)
     {
         if ($this->compound != '')
         {
             $this->compound .= ' ';
         }
+        if($operator === 'ALL' || $operator === 'DISTINCT')
+        {
+            $base = $type . " " . $operator;
+        }
+        else
+        {
+            $base = $type;
+        }
 
         $this->compound .= $base . ' ' . $sql_query;
     }
diff --git a/src/Lunr/Gravity/Database/MariaDB/MariaDBDMLQueryBuilder.php b/src/Lunr/Gravity/Database/MariaDB/MariaDBDMLQueryBuilder.php
index 3205eaf6c6ff7d13f83978a069394ce8ff75a783..d1c73bb3cb952c7dea2c07e24b08e9fb3e828ecb 100644
--- a/src/Lunr/Gravity/Database/MariaDB/MariaDBDMLQueryBuilder.php
+++ b/src/Lunr/Gravity/Database/MariaDB/MariaDBDMLQueryBuilder.php
@@ -50,6 +50,34 @@ class MariaDBDMLQueryBuilder extends MySQLDMLQueryBuilder
         return $this;
     }
 
+    /**
+     * Define a EXCEPT, EXCEPT ALL or EXCEPT DISTINCT clause of the SQL statement.
+     *
+     * @param string $sql_query SQL query reference
+     * @param string $operator  EXCEPT operation to perform
+     *
+     * @return MariaDBDMLQueryBuilder $self Self reference
+     */
+    public function except($sql_query, $operator = NULL)
+    {
+        $this->sql_compound($sql_query, 'EXCEPT', strtoupper($operator));
+        return $this;
+    }
+
+    /**
+     * Define a INTERSECT, INTERSECT ALL or INTERSECT DISTINCT clause of the SQL statement.
+     *
+     * @param string $sql_query SQL query reference
+     * @param string $operator  INTERSECT operation to perform
+     *
+     * @return MariaDBDMLQueryBuilder $self Self reference
+     */
+    public function intersect($sql_query, $operator = NULL)
+    {
+        $this->sql_compound($sql_query, 'INTERSECT', strtoupper($operator));
+        return $this;
+    }
+
 }
 
 ?>
diff --git a/src/Lunr/Gravity/Database/MariaDB/MariaDBSimpleDMLQueryBuilder.php b/src/Lunr/Gravity/Database/MariaDB/MariaDBSimpleDMLQueryBuilder.php
index 313dfff4f28f3c17c32b617bd0e1477df5198f66..7e177f7dab5d19b3a553e1f5e4d803490d8dd756 100644
--- a/src/Lunr/Gravity/Database/MariaDB/MariaDBSimpleDMLQueryBuilder.php
+++ b/src/Lunr/Gravity/Database/MariaDB/MariaDBSimpleDMLQueryBuilder.php
@@ -66,6 +66,35 @@ class MariaDBSimpleDMLQueryBuilder extends MySQLSimpleDMLQueryBuilder
         return $this;
     }
 
+    /**
+     * Define a INTERSECT, INTERSECT DISTINCT or INTERSECT ALL clause of the SQL statement.
+     *
+     * @param string $sql_query SQL query reference
+     * @param string $type      Type of INTERSECT operation to perform.
+     *
+     * @return MySQLSimpleDMLQueryBuilder $self Self reference
+     */
+    public function intersect($sql_query, $type = NULL)
+    {
+        $this->builder->intersect($this->escaper->query_value($sql_query), $type);
+        return $this;
+    }
+
+
+    /**
+     * Define a EXCEPT, EXCEPT DISTINCT or EXCEPT ALL clause of the SQL statement.
+     *
+     * @param string $sql_query SQL query reference
+     * @param string $type      Type of EXCEPT operation to perform.
+     *
+     * @return MySQLSimpleDMLQueryBuilder $self Self reference
+     */
+    public function except($sql_query, $type = NULL)
+    {
+        $this->builder->except($this->escaper->query_value($sql_query), $type);
+        return $this;
+    }
+
 }
 
 ?>
diff --git a/src/Lunr/Gravity/Database/MariaDB/Tests/MariaDBDMLQueryBuilderSelectTest.php b/src/Lunr/Gravity/Database/MariaDB/Tests/MariaDBDMLQueryBuilderSelectTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..e8ea41822d7c150f699f40e8a878b63f3e11ad74
--- /dev/null
+++ b/src/Lunr/Gravity/Database/MariaDB/Tests/MariaDBDMLQueryBuilderSelectTest.php
@@ -0,0 +1,140 @@
+<?php
+
+/**
+ * This file contains the MariaDBDMLQueryBuilderSelectTest class.
+ *
+ * @package    Lunr\Gravity\Database\MariaDB
+ * @author     David Cova <d.cova@m2mobi.com>
+ * @copyright  2013-2018, M2Mobi BV, Amsterdam, The Netherlands
+ * @license    http://lunr.nl/LICENSE MIT License
+ */
+
+namespace Lunr\Gravity\Database\MariaDB\Tests;
+
+use Lunr\Gravity\Database\MariaDB\Tests\MariaDBDMLQueryBuilderTest;
+/**
+ * This class contains select tests for the MariaDBDMLQueryBuilder class.
+ *
+ * @covers Lunr\Gravity\Database\MariaDB\MariaDBDMLQueryBuilder
+ */
+class MariaDBDMLQueryBuilderSelectTest extends MariaDBDMLQueryBuilderTest
+{
+     /**
+     * Test if except returns an instance of itself.
+     *
+     * @covers Lunr\Gravity\Database\MariaDB\MariaDBDMLQueryBuilder::except
+     */
+    public function testIfExceptReturnsSelfReference(): void
+    {
+        $return = $this->builder->except('query');
+
+        $this->assertInstanceOf('Lunr\Gravity\Database\MariaDB\MariaDBDMLQueryBuilder', $return);
+        $this->assertSame($this->builder, $return);
+    }
+
+    /**
+     * Test if intersect returns an instance of itself.
+     *
+     * @covers Lunr\Gravity\Database\MariaDB\MariaDBDMLQueryBuilder::intersect
+     */
+    public function testIfIntersectReturnsSelfReference(): void
+    {
+        $return = $this->builder->intersect('query');
+
+        $this->assertInstanceOf('Lunr\Gravity\Database\MariaDB\MariaDBDMLQueryBuilder', $return);
+        $this->assertSame($this->builder, $return);
+    }
+
+    /**
+     * Test if intersect() defaults to INTERSECT when a string other than DISTINCT or ALL is passed.
+     *
+     * @covers Lunr\Gravity\Database\MariaDB\MariaDBDMLQueryBuilder::intersect
+     */
+    public function testIntersectDefaults()
+    {
+        $this->builder->intersect('query','random_string');
+        $return = $this->builder_reflection->getProperty('compound');
+        $return->setAccessible(TRUE);
+
+        $actual = $return->getValue($this->builder);
+        $this->assertEquals('INTERSECT query', $actual);
+    }
+
+    /**
+     * Test if intersect() returns INTERSECT DISTINCT when DISTINCT is passed.
+     *
+     * @covers Lunr\Gravity\Database\MariaDB\MariaDBDMLQueryBuilder::intersect
+     */
+    public function testIntersectDistinct()
+    {
+        $this->builder->intersect('query','distinct');
+        $return = $this->builder_reflection->getProperty('compound');
+        $return->setAccessible(TRUE);
+
+        $actual = $return->getValue($this->builder);
+        $this->assertEquals('INTERSECT DISTINCT query', $actual);
+    }
+
+    /**
+     * Test if intersect() returns INTERSECT ALL when ALL is passed.
+     *
+     * @covers Lunr\Gravity\Database\MariaDB\MariaDBDMLQueryBuilder::intersect
+     */
+    public function testIntersectAll()
+    {
+        $this->builder->intersect('query','all');
+        $return = $this->builder_reflection->getProperty('compound');
+        $return->setAccessible(TRUE);
+
+        $actual = $return->getValue($this->builder);
+        $this->assertEquals('INTERSECT ALL query', $actual);
+    }
+
+    /**
+     * Test if except() defaults to EXCEPT when a string other than DISTINCT or ALL is passed.
+     *
+     * @covers Lunr\Gravity\Database\MariaDB\MariaDBDMLQueryBuilder::except
+     */
+    public function testExceptDefaults()
+    {
+        $this->builder->except('query','random_string');
+        $return = $this->builder_reflection->getProperty('compound');
+        $return->setAccessible(TRUE);
+
+        $actual = $return->getValue($this->builder);
+        $this->assertEquals('EXCEPT query', $actual);
+    }
+
+    /**
+     * Test if except() returns EXCEPT DISTINCT when DISTINCT is passed.
+     *
+     * @covers Lunr\Gravity\Database\MariaDB\MariaDBDMLQueryBuilder::except
+     */
+    public function testExceptDistinct()
+    {
+        $this->builder->except('query','DISTINCT');
+        $return = $this->builder_reflection->getProperty('compound');
+        $return->setAccessible(TRUE);
+
+        $actual = $return->getValue($this->builder);
+        $this->assertEquals('EXCEPT DISTINCT query', $actual);
+    }
+
+    /**
+     * Test if except() returns EXCEPT ALL when ALL is passed.
+     *
+     * @covers Lunr\Gravity\Database\MariaDB\MariaDBDMLQueryBuilder::except
+     */
+    public function testExceptAll()
+    {
+        $this->builder->except('query','all');
+        $return = $this->builder_reflection->getProperty('compound');
+        $return->setAccessible(TRUE);
+
+        $actual = $return->getValue($this->builder);
+        $this->assertEquals('EXCEPT ALL query', $actual);
+    }
+
+}
+
+?>
diff --git a/src/Lunr/Gravity/Database/MariaDB/Tests/MariaDBSimpleDMLQueryBuilderSelectTest.php b/src/Lunr/Gravity/Database/MariaDB/Tests/MariaDBSimpleDMLQueryBuilderSelectTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..64c7fe04645ed1d3b5e7444e6ccda0fd18ca82c8
--- /dev/null
+++ b/src/Lunr/Gravity/Database/MariaDB/Tests/MariaDBSimpleDMLQueryBuilderSelectTest.php
@@ -0,0 +1,227 @@
+<?php
+
+/**
+ * This file contains the MariaDBSimpleDMLQueryBuilderSelectTest class.
+ *
+ * @package    Lunr\Gravity\Database\MariaDB
+ * @author     David Cova <d.cova@m2mobi.com>
+ * @copyright  2013-2018, M2Mobi BV, Amsterdam, The Netherlands
+ * @license    http://lunr.nl/LICENSE MIT License
+ */
+
+namespace Lunr\Gravity\Database\MariaDB\Tests;
+
+use Lunr\Gravity\Database\MariaDB\MariaDBDMLQueryBuilder;
+use ReflectionClass;
+
+/**
+ * This class contains select tests for the MariaDBSimpleDMLQueryBuilder class.
+ *
+ * @covers Lunr\Gravity\Database\MariaDB\MariaDBSimpleDMLQueryBuilder
+ */
+class MariaDBSimpleDMLQueryBuilderSelectTest extends MariaDBSimpleDMLQueryBuilderTest
+{
+
+    /**
+     * Test intersect().
+     *
+     * @covers Lunr\Gravity\Database\MariaDB\MariaDBSimpleDMLQueryBuilder::intersect
+     */
+    public function testIntersect(): void
+    {
+        $this->escaper->expects($this->once())
+                      ->method('query_value')
+                      ->with('query')
+                      ->willReturn('(query)');
+
+        $this->builder->expects($this->once())
+                      ->method('intersect')
+                      ->with('(query)')
+                      ->willReturnSelf();
+
+        $this->class->intersect('query');
+    }
+
+    /**
+     * Test intersect() distinct.
+     *
+     * @covers Lunr\Gravity\Database\MariaDB\MariaDBSimpleDMLQueryBuilder::intersect
+     */
+    public function testIntersectDistinct(): void
+    {
+        $this->escaper->expects($this->once())
+                      ->method('query_value')
+                      ->with('query')
+                      ->willReturn('(query)');
+
+        $this->builder->expects($this->once())
+                      ->method('intersect')
+                      ->with('(query)', 'DISTINCT')
+                      ->willReturnSelf();
+
+        $this->class->intersect('query', 'DISTINCT');
+    }
+
+    /**
+     * Test intersect() all.
+     *
+     * @covers Lunr\Gravity\Database\MariaDB\MariaDBSimpleDMLQueryBuilder::intersect
+     */
+    public function testIntersectAll(): void
+    {
+        $this->escaper->expects($this->once())
+                      ->method('query_value')
+                      ->with('query')
+                      ->willReturn('(query)');
+
+        $this->builder->expects($this->once())
+                      ->method('intersect')
+                      ->with('(query)', 'ALL')
+                      ->willReturnSelf();
+
+        $this->class->intersect('query', 'ALL');
+    }
+
+    /**
+     * Test intersect() when parameter passed is TRUE.
+     *
+     * @covers Lunr\Gravity\Database\MariaDB\MariaDBSimpleDMLQueryBuilder::intersect
+     */
+    public function testIntersectWithTypeTrue(): void
+    {
+        $this->escaper->expects($this->once())
+                      ->method('query_value')
+                      ->with('query')
+                      ->willReturn('(query)');
+
+        $this->builder->expects($this->once())
+                      ->method('intersect')
+                      ->with('(query)', TRUE)
+                      ->willReturnSelf();
+
+        $this->class->intersect('query', TRUE);
+    }
+
+    /**
+     * Test intersect() when parameter passed is FALSE.
+     *
+     * @covers Lunr\Gravity\Database\MariaDB\MariaDBSimpleDMLQueryBuilder::intersect
+     */
+    public function testIntersectWithTypeFalse(): void
+    {
+        $this->escaper->expects($this->once())
+                      ->method('query_value')
+                      ->with('query')
+                      ->willReturn('(query)');
+
+        $this->builder->expects($this->once())
+                      ->method('intersect')
+                      ->with('(query)', FALSE)
+                      ->willReturnSelf();
+
+        $this->class->intersect('query', FALSE);
+    }
+
+    /**
+     * Test except().
+     *
+     * @covers Lunr\Gravity\Database\MariaDB\MariaDBSimpleDMLQueryBuilder::except
+     */
+    public function testExcept(): void
+    {
+        $this->escaper->expects($this->once())
+                      ->method('query_value')
+                      ->with('query')
+                      ->willReturn('(query)');
+
+        $this->builder->expects($this->once())
+                      ->method('except')
+                      ->with('(query)')
+                      ->willReturnSelf();
+
+        $this->class->except('query');
+    }
+
+    /**
+     * Test except() distinct.
+     *
+     * @covers Lunr\Gravity\Database\MariaDB\MariaDBSimpleDMLQueryBuilder::except
+     */
+    public function testExceptDistinct(): void
+    {
+        $this->escaper->expects($this->once())
+                      ->method('query_value')
+                      ->with('query')
+                      ->willReturn('(query)');
+
+        $this->builder->expects($this->once())
+                      ->method('except')
+                      ->with('(query)', 'DISTINCT')
+                      ->willReturnSelf();
+
+        $this->class->except('query', 'DISTINCT');
+    }
+
+    /**
+     * Test except() all.
+     *
+     * @covers Lunr\Gravity\Database\MariaDB\MariaDBSimpleDMLQueryBuilder::except
+     */
+    public function testExceptAll(): void
+    {
+        $this->escaper->expects($this->once())
+                      ->method('query_value')
+                      ->with('query')
+                      ->willReturn('(query)');
+
+        $this->builder->expects($this->once())
+                      ->method('except')
+                      ->with('(query)', 'ALL')
+                      ->willReturnSelf();
+
+        $this->class->except('query', 'ALL');
+    }
+
+    /**
+     * Test except() when parameter passed is TRUE.
+     *
+     * @covers Lunr\Gravity\Database\MariaDB\MariaDBSimpleDMLQueryBuilder::except
+     */
+    public function testExceptWithTypeTrue(): void
+    {
+        $this->escaper->expects($this->once())
+                      ->method('query_value')
+                      ->with('query')
+                      ->willReturn('(query)');
+
+        $this->builder->expects($this->once())
+                      ->method('except')
+                      ->with('(query)', TRUE)
+                      ->willReturnSelf();
+
+        $this->class->except('query', TRUE);
+    }
+
+    /**
+     * Test except() when parameter passed is FALSE.
+     *
+     * @covers Lunr\Gravity\Database\MariaDB\MariaDBSimpleDMLQueryBuilder::except
+     */
+    public function testExceptWithTypeFalse(): void
+    {
+        $this->escaper->expects($this->once())
+                      ->method('query_value')
+                      ->with('query')
+                      ->willReturn('(query)');
+
+        $this->builder->expects($this->once())
+                      ->method('except')
+                      ->with('(query)', FALSE)
+                      ->willReturnSelf();
+
+        $this->class->except('query', FALSE);
+    }
+
+}
+
+?>
diff --git a/src/Lunr/Gravity/Database/MySQL/MySQLSimpleDMLQueryBuilder.php b/src/Lunr/Gravity/Database/MySQL/MySQLSimpleDMLQueryBuilder.php
index 4d2faca639ee137b3cf9b46213c2b5024c937a81..c9f1f1ce41f1bcb8e783a6d3da758ec9e42d4520 100644
--- a/src/Lunr/Gravity/Database/MySQL/MySQLSimpleDMLQueryBuilder.php
+++ b/src/Lunr/Gravity/Database/MySQL/MySQLSimpleDMLQueryBuilder.php
@@ -782,13 +782,13 @@ class MySQLSimpleDMLQueryBuilder implements DMLQueryBuilderInterface
      * Define a UNION or UNION ALL clause of the SQL statement.
      *
      * @param string $sql_query SQL query reference
-     * @param bool   $all       True for ALL or False for empty (default).
+     * @param string $type      Type of UNION operation to perform.
      *
      * @return MySQLSimpleDMLQueryBuilder $self Self reference
      */
-    public function union($sql_query, $all = FALSE)
+    public function union($sql_query, $type = NULL)
     {
-        $this->builder->union($this->escaper->query_value($sql_query), $all);
+        $this->builder->union($this->escaper->query_value($sql_query), $type);
         return $this;
     }
 
diff --git a/src/Lunr/Gravity/Database/MySQL/Tests/MySQLSimpleDMLQueryBuilderSelectTest.php b/src/Lunr/Gravity/Database/MySQL/Tests/MySQLSimpleDMLQueryBuilderSelectTest.php
index 7cf20eda8677702090279357ddc98389e3cf23dc..61421150cd8fcfb2ded71c2989695bc2add5c9ad 100644
--- a/src/Lunr/Gravity/Database/MySQL/Tests/MySQLSimpleDMLQueryBuilderSelectTest.php
+++ b/src/Lunr/Gravity/Database/MySQL/Tests/MySQLSimpleDMLQueryBuilderSelectTest.php
@@ -200,18 +200,38 @@ class MySQLSimpleDMLQueryBuilderSelectTest extends MySQLSimpleDMLQueryBuilderTes
     {
         $this->escaper->expects($this->once())
                       ->method('query_value')
-                      ->with($this->equalTo('query'))
-                      ->will($this->returnValue('(query)'));
+                      ->with('query')
+                      ->willReturn('(query)');
 
         $this->builder->expects($this->once())
                       ->method('union')
-                      ->with($this->equalTo('(query)'))
-                      ->will($this->returnSelf());
+                      ->with('(query)')
+                      ->willReturnSelf();
 
         $this->class->union('query');
     }
 
-     /**
+    /**
+     * Test union() distinct.
+     *
+     * @covers Lunr\Gravity\Database\MySQL\MySQLSimpleDMLQueryBuilder::union
+     */
+    public function testUnionDistinct(): void
+    {
+        $this->escaper->expects($this->once())
+                      ->method('query_value')
+                      ->with('query')
+                      ->willReturn('(query)');
+
+        $this->builder->expects($this->once())
+                      ->method('union')
+                      ->with('(query)', 'DISTINCT')
+                      ->willReturnSelf();
+
+        $this->class->union('query', 'DISTINCT');
+    }
+
+    /**
      * Test union() all.
      *
      * @covers Lunr\Gravity\Database\MySQL\MySQLSimpleDMLQueryBuilder::union
@@ -220,17 +240,57 @@ class MySQLSimpleDMLQueryBuilderSelectTest extends MySQLSimpleDMLQueryBuilderTes
     {
         $this->escaper->expects($this->once())
                       ->method('query_value')
-                      ->with($this->equalTo('query'))
-                      ->will($this->returnValue('(query)'));
+                      ->with('query')
+                      ->willReturn('(query)');
 
         $this->builder->expects($this->once())
                       ->method('union')
-                      ->with($this->equalTo('(query)', TRUE), $this->equalTo(TRUE))
-                      ->will($this->returnSelf());
+                      ->with('(query)', 'ALL')
+                      ->willReturnSelf();
+
+        $this->class->union('query', 'ALL');
+    }
+
+    /**
+     * Test union() when parameter passed is TRUE.
+     *
+     * @covers Lunr\Gravity\Database\MySQL\MySQLSimpleDMLQueryBuilder::union
+     */
+    public function testUnionWithTypeTrue(): void
+    {
+        $this->escaper->expects($this->once())
+                      ->method('query_value')
+                      ->with('query')
+                      ->willReturn('(query)');
+
+        $this->builder->expects($this->once())
+                      ->method('union')
+                      ->with('(query)', TRUE)
+                      ->willReturnSelf();
 
         $this->class->union('query', TRUE);
     }
 
+    /**
+     * Test union() when parameter passed is FALSE.
+     *
+     * @covers Lunr\Gravity\Database\MySQL\MySQLSimpleDMLQueryBuilder::union
+     */
+    public function testUnionWithTypeFalse(): void
+    {
+        $this->escaper->expects($this->once())
+                      ->method('query_value')
+                      ->with('query')
+                      ->willReturn('(query)');
+
+        $this->builder->expects($this->once())
+                      ->method('union')
+                      ->with('(query)', FALSE)
+                      ->willReturnSelf();
+
+        $this->class->union('query', FALSE);
+    }
+
 }
 
 ?>
diff --git a/src/Lunr/Gravity/Database/SQLDMLQueryBuilder.php b/src/Lunr/Gravity/Database/SQLDMLQueryBuilder.php
index 8598aa54e5c2ce0a3cb656a454372ce48dee62b1..df6913a85513764c9431aa2de3ceec5e9f89918d 100644
--- a/src/Lunr/Gravity/Database/SQLDMLQueryBuilder.php
+++ b/src/Lunr/Gravity/Database/SQLDMLQueryBuilder.php
@@ -517,17 +517,16 @@ abstract class SQLDMLQueryBuilder extends DatabaseDMLQueryBuilder
     }
 
     /**
-     * Define a UNION or UNION ALL clause of the SQL statement.
-     *
-     * @param string $sql_query SQL query reference
-     * @param bool   $all       True for ALL or False for empty (default).
-     *
-     * @return SQLDMLQueryBuilder $self Self reference
-     */
-    public function union($sql_query, $all = FALSE)
-    {
-        $base = ($all === TRUE) ? 'UNION ALL' : 'UNION';
-        $this->sql_compound($sql_query, $base);
+    * Define a UNION, UNION DISTINCT or UNION ALL clause of the SQL statement.
+    *
+    * @param string $sql_query SQL query reference
+    * @param string $operator  UNION operation to perform
+    *
+    * @return SQLDMLQueryBuilder $self Self reference
+    */
+    public function union($sql_query, $operator = NULL)
+    {
+        $this->sql_compound($sql_query, 'UNION', strtoupper($operator));
         return $this;
     }
 
diff --git a/src/Lunr/Gravity/Database/SQLite3/SQLite3DMLQueryBuilder.php b/src/Lunr/Gravity/Database/SQLite3/SQLite3DMLQueryBuilder.php
index 02f88bfdb82fa8288b0115a939627c405de92a42..c39569b5518cb143c5776ef113d395ba6e2d688f 100644
--- a/src/Lunr/Gravity/Database/SQLite3/SQLite3DMLQueryBuilder.php
+++ b/src/Lunr/Gravity/Database/SQLite3/SQLite3DMLQueryBuilder.php
@@ -267,6 +267,42 @@ class SQLite3DMLQueryBuilder extends SQLDMLQueryBuilder
         return $this;
     }
 
+    /**
+     * Define a EXCEPT, EXCEPT ALL or EXCEPT DISTINCT clause of the SQL statement.
+     *
+     * @param string $sql_query SQL query reference
+     * @param string $operator  EXCEPT operation to perform
+     *
+     * @return SQLite3DMLQueryBuilder $self Self reference
+     */
+    public function except($sql_query, $operator = NULL)
+    {
+        if(strtoupper($operator) !== 'DISTINCT')
+        {
+            $operator = NULL;
+        }
+        $this->sql_compound($sql_query, 'EXCEPT', $operator);
+        return $this;
+    }
+
+    /**
+     * Define a INTERSECT, INTERSECT ALL or INTERSECT DISTINCT clause of the SQL statement.
+     *
+     * @param string $sql_query SQL query reference
+     * @param string $operator  INTERSECT operation to perform
+     *
+     * @return SQLite3DMLQueryBuilder $self Self reference
+     */
+    public function intersect($sql_query, $operator = NULL)
+    {
+        if(strtoupper($operator) !== 'DISTINCT')
+        {
+            $operator = NULL;
+        }
+        $this->sql_compound($sql_query, 'INTERSECT', $operator);
+        return $this;
+    }
+
 }
 
 ?>
diff --git a/src/Lunr/Gravity/Database/SQLite3/Tests/SQLite3DMLQueryBuilderSelectTest.php b/src/Lunr/Gravity/Database/SQLite3/Tests/SQLite3DMLQueryBuilderSelectTest.php
index 4aa1ee51d44ea564c73f5953093a6dba22c0d6c5..e57bc62afef0948d4b2c1dd0e1eb0bc83bb62426 100644
--- a/src/Lunr/Gravity/Database/SQLite3/Tests/SQLite3DMLQueryBuilderSelectTest.php
+++ b/src/Lunr/Gravity/Database/SQLite3/Tests/SQLite3DMLQueryBuilderSelectTest.php
@@ -96,4 +96,80 @@ class SQLite3DMLQueryBuilderSelectTest extends SQLite3DMLQueryBuilderTest
         $this->assertSame($this->class, $return);
     }
 
+    /**
+     * Test if except returns an instance of itself.
+     *
+     * @covers Lunr\Gravity\Database\SQLite3\SQLite3DMLQueryBuilder::except
+     */
+    public function testIfExceptReturnsSelfReference()
+    {
+        $except = $this->class->except('query');
+
+        $this->assertInstanceOf('Lunr\Gravity\Database\SQLite3\SQLite3DMLQueryBuilder', $except);
+        $this->assertSame($this->class, $except);
+    }
+
+    /**
+     * Test if intersect returns an instance of itself.
+     *
+     * @covers Lunr\Gravity\Database\SQLite3\SQLite3DMLQueryBuilder::intersect
+     */
+    public function testIfIntersectReturnsSelfReference()
+    {
+        $intersect = $this->class->intersect('query');
+
+        $this->assertInstanceOf('Lunr\Gravity\Database\SQLite3\SQLite3DMLQueryBuilder', $intersect);
+        $this->assertSame($this->class, $intersect);
+    }
+
+    /**
+     * Test if intersect() defaults to INTERSECT when a string other than DISTINCT is passed.
+     *
+     * @covers Lunr\Gravity\Database\SQLite3\SQLite3DMLQueryBuilder::intersect
+     */
+    public function testIntersectDefaults()
+    {
+        $this->class->intersect('query','random_string');
+        $returned = $this->get_reflection_property_value('compound');
+        $this->assertEquals('INTERSECT query', $returned);
+    }
+
+    /**
+     * Test if intersect() returns INTERSECT DISTINCT when DISTINCT is passed.
+     *
+     * @covers Lunr\Gravity\Database\SQLite3\SQLite3DMLQueryBuilder::intersect
+     */
+    public function testIntersectDistinct()
+    {
+        $this->class->intersect('query','DISTINCT');
+        $returned = $this->get_reflection_property_value('compound');
+        $this->assertEquals('INTERSECT DISTINCT query', $returned);
+    }
+
+    /**
+     * Test if except() defaults to EXCEPT when a string other than DISTINCT is passed.
+     *
+     * @covers Lunr\Gravity\Database\SQLite3\SQLite3DMLQueryBuilder::except
+     */
+    public function testExceptDefaults()
+    {
+        $this->class->except('query','random_string');
+        $returned = $this->get_reflection_property_value('compound');
+        $this->assertEquals('EXCEPT query', $returned);
+    }
+
+    /**
+     * Test if except() returns EXCEPT DISTINCT when DISTINCT is passed.
+     *
+     * @covers Lunr\Gravity\Database\SQLite3\SQLite3DMLQueryBuilder::except
+     */
+    public function testExceptDistinct()
+    {
+        $this->class->except('query','DISTINCT');
+        $returned = $this->get_reflection_property_value('compound');
+        $this->assertEquals('EXCEPT DISTINCT query', $returned);
+    }
+
 }
+
+?>
diff --git a/src/Lunr/Gravity/Database/Tests/DatabaseDMLQueryBuilderQueryPartsTest.php b/src/Lunr/Gravity/Database/Tests/DatabaseDMLQueryBuilderQueryPartsTest.php
index 1dcb661843034cf2d9f4547dde12868cd36bdbeb..07f31833c245b4a7dc52ad5c7e60d26a5a59f773 100644
--- a/src/Lunr/Gravity/Database/Tests/DatabaseDMLQueryBuilderQueryPartsTest.php
+++ b/src/Lunr/Gravity/Database/Tests/DatabaseDMLQueryBuilderQueryPartsTest.php
@@ -25,16 +25,36 @@ class DatabaseDMLQueryBuilderQueryPartsTest extends DatabaseDMLQueryBuilderTest
     /**
      * Test specifying the UNION part of a query.
      *
-     * @param string $types Compound query operator
+     * @param string $types     Compound query operator
      *
-     * @dataProvider compoundQueryTypeProvider
+     * @dataProvider compoundQueryTypeAndOperatorProvider
      * @covers       Lunr\Gravity\Database\DatabaseDMLQueryBuilder::sql_compound
      */
-    public function testCompoundQuery($types): void
+    public function testCompoundQuery($types, $operator = NULL): void
     {
         $method = $this->get_accessible_reflection_method('sql_compound');
 
-        $method->invokeArgs($this->class, [ '(sql query)', $types ]);
+        $method->invokeArgs($this->class, [ '(sql query)', $types, $operator ]);
+
+        ($operator === NULL) ? $string = $types . ' (sql query)'
+                             : $string = $types . " " . $operator . ' (sql query)';
+
+        $this->assertPropertyEquals('compound', $string);
+    }
+
+    /**
+     * Test specifying the UNION part of a query with invalid parameters.
+     *
+     * @param string $types     Compound query operator
+     *
+     * @dataProvider compoundQueryInvalidTypeAndOperatorProvider
+     * @covers       Lunr\Gravity\Database\DatabaseDMLQueryBuilder::sql_compound
+     */
+    public function testCompoundQueryUnsupportedOperators($types, $operator): void
+    {
+        $method = $this->get_accessible_reflection_method('sql_compound');
+
+        $method->invokeArgs($this->class, [ '(sql query)', $types, $operator ]);
 
         $string = $types . ' (sql query)';
 
@@ -57,6 +77,38 @@ class DatabaseDMLQueryBuilderQueryPartsTest extends DatabaseDMLQueryBuilderTest
         $this->assertPropertyEquals('compound', 'QUERY UNION (sql query)');
     }
 
+    /**
+     * Test specifying the EXCEPT part of a query, when compound is set.
+     *
+     * @covers Lunr\Gravity\Database\DatabaseDMLQueryBuilder::sql_compound
+     */
+    public function testCompoundQueryWhenCompoundIsSetWithExcept(): void
+    {
+        $this->set_reflection_property_value('compound', 'QUERY');
+
+        $method = $this->get_accessible_reflection_method('sql_compound');
+
+        $method->invokeArgs($this->class, [ '(sql query)', 'EXCEPT' ]);
+
+        $this->assertPropertyEquals('compound', 'QUERY EXCEPT (sql query)');
+    }
+
+    /**
+     * Test specifying the INTERSECT part of a query, when compound is set.
+     *
+     * @covers Lunr\Gravity\Database\DatabaseDMLQueryBuilder::sql_compound
+     */
+    public function testCompoundQueryWhenCompoundIsSetWithIntersect(): void
+    {
+        $this->set_reflection_property_value('compound', 'QUERY');
+
+        $method = $this->get_accessible_reflection_method('sql_compound');
+
+        $method->invokeArgs($this->class, [ '(sql query)', 'INTERSECT' ]);
+
+        $this->assertPropertyEquals('compound', 'QUERY INTERSECT (sql query)');
+    }
+
     /**
      * Test creating a simple order by statement.
      *
diff --git a/src/Lunr/Gravity/Database/Tests/DatabaseDMLQueryBuilderTest.php b/src/Lunr/Gravity/Database/Tests/DatabaseDMLQueryBuilderTest.php
index b180e22ed1ac5bebe7b6d0260d1637b987cecfb6..11609573a07f5e0435dc42fcda10a0985c73def0 100644
--- a/src/Lunr/Gravity/Database/Tests/DatabaseDMLQueryBuilderTest.php
+++ b/src/Lunr/Gravity/Database/Tests/DatabaseDMLQueryBuilderTest.php
@@ -114,13 +114,42 @@ abstract class DatabaseDMLQueryBuilderTest extends LunrBaseTest
     *
     * @return array $compound Array of compound types
     */
-    public function compoundQueryTypeProvider(): array
+    public function compoundQueryTypeAndOperatorProvider(): array
     {
         $types   = [];
         $types[] = [ 'UNION' ];
-        $types[] = [ 'UNION ALL' ];
-        $types[] = [ 'EXCEPT' ];
+        $types[] = [ 'UNION','ALL' ];
+        $types[] = [ 'UNION','DISTINCT' ];
         $types[] = [ 'INTERSECT' ];
+        $types[] = [ 'INTERSECT','ALL' ];
+        $types[] = [ 'INTERSECT','DISTINCT' ];
+        $types[] = [ 'EXCEPT' ];
+        $types[] = [ 'EXCEPT','ALL' ];
+        $types[] = [ 'EXCEPT','DISTINCT' ];
+
+        return $types;
+    }
+
+    /**
+    * Unit test data provider for common compound queries.
+    *
+    * @return array $compound Array of compound types
+    */
+    public function compoundQueryInvalidTypeAndOperatorProvider(): array
+    {
+        $types   = [];
+        $types[] = [ 'UNION','Some Operator' ];
+        $types[] = [ 'UNION', 0 ];
+        $types[] = [ 'UNION', FALSE ];
+        $types[] = [ 'UNION', TRUE ];
+        $types[] = [ 'INTERSECT','Some Operator' ];
+        $types[] = [ 'INTERSECT', 0 ];
+        $types[] = [ 'INTERSECT', FALSE ];
+        $types[] = [ 'INTERSECT', TRUE ];
+        $types[] = [ 'EXCEPT','Some Operator' ];
+        $types[] = [ 'EXCEPT', 0 ];
+        $types[] = [ 'EXCEPT', FALSE ];
+        $types[] = [ 'EXCEPT', TRUE ];
 
         return $types;
     }
diff --git a/src/Lunr/Gravity/Database/Tests/SQLDMLQueryBuilderSelectTest.php b/src/Lunr/Gravity/Database/Tests/SQLDMLQueryBuilderSelectTest.php
index b6986b6c0adb48bc0cc0de6a8b7532b14b4e8ded..f68ae66e7cf8e600f98f7638b00c0677edae4720 100644
--- a/src/Lunr/Gravity/Database/Tests/SQLDMLQueryBuilderSelectTest.php
+++ b/src/Lunr/Gravity/Database/Tests/SQLDMLQueryBuilderSelectTest.php
@@ -171,11 +171,24 @@ class SQLDMLQueryBuilderSelectTest extends SQLDMLQueryBuilderTest
      */
     public function testUnion(): void
     {
-        $return = $this->class->union('QUERY');
+        $this->class->union('QUERY');
 
         $this->assertPropertyEquals('compound', 'UNION QUERY');
     }
 
+    /**
+     * Test specifying a UNION DISTINCT statement.
+     *
+     * @depends Lunr\Gravity\Database\Tests\DatabaseDMLQueryBuilderQueryPartsTest::testCompoundQuery
+     * @covers  Lunr\Gravity\Database\SQLDMLQueryBuilder::union
+     */
+    public function testUnionDistinct(): void
+    {
+        $this->class->union('QUERY', 'DISTINCT');
+
+        $this->assertPropertyEquals('compound', 'UNION DISTINCT QUERY');
+    }
+
     /**
      * Test specifying a UNION ALL statement.
      *
@@ -184,7 +197,7 @@ class SQLDMLQueryBuilderSelectTest extends SQLDMLQueryBuilderTest
      */
     public function testUnionAll(): void
     {
-        $return = $this->class->union('QUERY', TRUE);
+        $this->class->union('QUERY', 'ALL');
 
         $this->assertPropertyEquals('compound', 'UNION ALL QUERY');
     }
diff --git a/tests/phpunit.xml b/tests/phpunit.xml
index 0b58d694208c832f1260faddea54a34fdc86afb4..9fb672b6e12c908b34927b40c2c3f0778169ff6d 100644
--- a/tests/phpunit.xml
+++ b/tests/phpunit.xml
@@ -157,6 +157,8 @@
             <file>../src/Lunr/Gravity/Database/MySQL/Tests/MySQLConnectionMasterSlaveTest.php</file>
             <file>../src/Lunr/Gravity/Database/MariaDB/Tests/MariaDBConnectionBaseTest.php</file>
             <file>../src/Lunr/Gravity/Database/MariaDB/Tests/MariaDBDMLQueryBuilderDeleteTest.php</file>
+            <file>../src/Lunr/Gravity/Database/MariaDB/Tests/MariaDBDMLQueryBuilderSelectTest.php</file>
+            <file>../src/Lunr/Gravity/Database/MariaDB/Tests/MariaDBSimpleDMLQueryBuilderSelectTest.php</file>
             <file>../src/Lunr/Gravity/Database/MariaDB/Tests/MariaDBSimpleDMLQueryBuilderBaseTest.php</file>
             <file>../src/Lunr/Gravity/Database/MariaDB/Tests/MariaDBSimpleDMLQueryBuilderDeleteTest.php</file>
             <file>../src/Lunr/Gravity/Database/MariaDB/Tests/MariaDBSimpleDMLQueryBuilderBaseTest.php</file>
