---
title: "Differences: DB2 SELECT Vs. Sub-SELECT Vs. Full SELECT"
description: "  [   DB2 Developer Jobs ] https://srinimf.com/2015/01/27/sql-eliminating-duplicates-in-a-table/. https://srinimf.com/2015/05/18/db2-new-built-in-functions-in-version-11/. https://srinimf.com/2013/11/..."
url: https://srinimf.com/2015/10/19/differences-of-db2-select-sub-select-and-full-select/
date: 2015-10-19
modified: 2026-10-10
author: "Srini"
image: https://i0.wp.com/srinimf.com/wp-content/uploads/2015/10/pexels-photo-7648315.jpeg?fit=1880%2C1253&ssl=1
categories: ["DB2", "DB2 V11"]
tags: ["DB2 Tips and Solutions", "FULLSELECT", "select", "SUBSELECT"]
type: post
lang: en
---

# Differences: DB2 SELECT Vs. Sub-SELECT Vs. Full SELECT

[![DB2 Developer Jobs](https://i0.wp.com/srinimf.com/wp-content/uploads/2015/10/s3.png?resize=180%2C242&ssl=1)](http://www.indeed.com/jobs?q=CICS+DB2&indpubnum=6634974704162507)*  [  **DB2 Developer Jobs ]***

Related[2 SQL Ideas to Remove Duplicate Rows](https://srinimf.com/2015/01/27/sql-eliminating-duplicates-in-a-table/)

Related[What are Array functions Read today](https://srinimf.com/2015/05/18/db2-new-built-in-functions-in-version-11/)

Related[DB2 11- Advanced Featutres](https://srinimf.com/2013/11/06/db2-11-advanced-featutres/)

Related[DB2 Rowset to Fetch Multi-rows Easily](https://srinimf.com/2010/10/16/db2-we-can-fetch-multi-rows-with-cursor/)

SELECT -The select-statement is the form of a query that can be directly specified in a DECLARE CURSOR statement or FOR statement, prepared and then referenced in a DECLARE CURSOR statement, or directly specified in an SQLJ assignment clause. It can also be issued using SPUFI or the command line processor which causes a result table to be displayed at your terminal. In any case, the result table specified by a select-statement is the result of the fullselect.

Related[3 Methods to Select a Stock (Share)](https://srinimf.com/2012/02/02/1131/)

**Example:**

SELECT * FROM DSN8A10.EMP;

Related[3 Neat SQL Queries to View Table Structure in DB2](https://srinimf.com/2020/06/14/3-sql-queries-you-need-to-get-db2-table-details/)

FULLSELECT – The fullselect is a component of the select-statement, ALTER TABLE statement for the definition of a materialized query table, CREATE TABLE statement, CREATE VIEW statement, DECLARE [GLOBAL TEMPORARY](https://srinimf.com/2010/04/28/db2-temp-table/) TABLE statement, and INSERT statement.

Related[DB2- Avoid Select Column Before do UPDATE](https://srinimf.com/2015/02/10/db2-avoid-select-column-before-do-update/)

**Example:**

SELECT EMPNO
FROM EMPLOYEE
WHERE WORKDEPT LIKE ‘E%’
UNION
SELECT EMPNO
FROM EMP_ACT
WHERE PROJNO IN(‘MA2100’, ‘MA2110’, ‘MA2112’)

Related[20 Top DB2 Frequently Asked Questions](https://srinimf.com/2015/05/10/top-db2-frequently-asked-questions-part1/)

SUBSELECT – The *subselect* is a component of the fullselect. A subselect specifies a result table that is derived from the tables or views that are identified in the FROM clause.

Related[Derived Table Vs. Sub-Query – Here are Top Differences](https://srinimf.com/2019/03/06/db2-derived-table-key-knowledge-points-you-need-to-learn/)

**Example:**

SELECT E.EMPNO, E.LASTNAME, M.EMPNO, M.LASTNAME
FROM EMPLOYEE E LEFT OUTER JOIN
DEPARTMENT INNER JOIN EMPLOYEE M
ON MGRNO = M.EMPNO
ON E.WORKDEPT = DEPTNO

Related[SQL Query Raise_Error Function- Here’s Best Example](https://srinimf.com/2013/04/01/db2-raise-error-function/)

Ref:IBM

Related[5 More Frequently Asked DB2 SQL Queries](https://srinimf.com/2015/05/15/5-more-frequently-asked-db2-sql-queries/)

### Share this:

-
- [Tweet](https://twitter.com/share)
- [![](https://i0.wp.com/assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png)](https://www.pinterest.com/pin/create/link/?url=https%3A%2F%2Fsrinimf.com%2F2015%2F10%2F19%2Fdifferences-of-db2-select-sub-select-and-full-select%2F&media=https%3A%2F%2Fi0.wp.com%2Fsrinimf.com%2Fwp-content%2Fuploads%2F2015%2F10%2Fpexels-photo-7648315.jpeg%3Ffit%3D1200%252C800%26ssl%3D1&description=Differences%3A%20DB2%20SELECT%20Vs.%20Sub-SELECT%20Vs.%20Full%20SELECT)
-
- [Share on Tumblr](https://www.tumblr.com/share)
- [Share on WhatsApp (Opens in new window) WhatsApp](https://srinimf.com/2015/10/19/differences-of-db2-select-sub-select-and-full-select/?share=jetpack-whatsapp)
- [More](#)
-

- [Print (Opens in new window) Print](https://srinimf.com/2015/10/19/differences-of-db2-select-sub-select-and-full-select/?share=print)
- [Share on Reddit (Opens in new window) Reddit](https://srinimf.com/2015/10/19/differences-of-db2-select-sub-select-and-full-select/?share=reddit)
- [Share on Telegram (Opens in new window) Telegram](https://srinimf.com/2015/10/19/differences-of-db2-select-sub-select-and-full-select/?share=telegram)
- [Email a link to a friend (Opens in new window) Email](mailto:?subject=%5BShared%20Post%5D%20Differences%3A%20DB2%20SELECT%20Vs.%20Sub-SELECT%20Vs.%20Full%20SELECT&body=https%3A%2F%2Fsrinimf.com%2F2015%2F10%2F19%2Fdifferences-of-db2-select-sub-select-and-full-select%2F&share=email)
-

### Like this:

Like Loading…
