# Nested SQL

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Nested_SQL
> Markdown URL: https://mediated.wiki/source/Nested_SQL.md
> Source: https://en.wikipedia.org/wiki/Nested_SQL
> Source revision: 1278745854
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

{{about|tables as column data|nested queries|Correlated subquery}}

In [relational databases](/source/relational_databases), a '''nested table''' is a [table](/source/Table_(database)) that is embedded within another table. 

Individual elements can be inserted, updated, and deleted in a nested table. Since individual [elements](/source/Element_(mathematics)) can be modified in a nested table, they are more flexible than an [array](/source/array_data_structure) because elements in an array can only be modified as a whole, not individually. 

A nested table doesn't have a maximum size, and an arbitrary number of elements can be stored in it.

==External links==
*{{cite web
  |url=https://docs.microsoft.com/en-us/sql/analysis-services/data-mining/nested-tables-analysis-services-data-mining?view=sql-server-2017
  |title=Nested Tables (Analysis Services - Data Mining)
  |date=2018-05-07
  |df=mdy-all
  |website=Microsoft
}}
*{{cite web
  |url=https://docs.oracle.com/database/121/LNPLS/composites.htm#GUID-5ADB7EE2-71F6-4172-ACD8-FFDCF2787A37
  |title=PL/SQL Collections and Records: Nested Tables
  |work=Oracle Database Online Documentation Library, 12c Release 1 (12.1.0.2)
  |year=2017
}}
*{{cite web|url=http://blogs.ittoolbox.com/oracle/guide/archives/oracle-collections-a-definition-in-plain-english-part-2-6003 |title=Oracle Collections: A Definition in Plain English Part 2|archive-url=https://web.archive.org/web/20060701234934/http://blogs.ittoolbox.com/oracle/guide/archives/oracle-collections-a-definition-in-plain-english-part-2-6003|archive-date=2006-07-01|df=mdy-all}}
*{{cite web|url=http://www.oraclepressonline.com/toc.jsp?bookid=8172&prevbkid=&nextbkid= |title=Oracle Database 10g: SQL (Oracle Press)|archive-url=https://web.archive.org/web/20050908164422/http://www.oraclepressonline.com/toc.jsp?bookid=8172|archive-date=2005-09-08|df=mdy-all}}

Category:Database management systems
Category:SQL
Category:Relational database management systems

---
Adapted from the Wikipedia article [Nested SQL](https://en.wikipedia.org/wiki/Nested_SQL) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Nested_SQL?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
