Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 21 in printed book and digital formats -- plus a one-year subscription (beginning with 22.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 20.3 ('XDC Anywhere')
Instant purchase and download via GumRoad!

COLUMN

SQL Subqueries

Queries within queries

Issue: 20.3 (May/June 2022)
Author: Vince Du Beau
Author Bio: Vince is an experienced Filemaker developer. He is exploring XOJO as an alternative to Filemaker.
Article Description: No description available.
Article Length (in bytes): 5,504
Starting Page Number: 84
Article Number: 20310
Related Link(s): None

Excerpt of article text...

A subquery is a SELECT within another SQL statement. They are also know as an inner query or nested query. They can be used with SELECTs, INSERTs, UPDATEs, and DELETEs. Here I have only used it within another SELECT statement.

The following rules for subqueries are from https://www.tutorialspoint.com/sql/sql-sub-queries.htm: Subqueries must be enclosed within parentheses.

  • A subquery can have only one column in the SELECT clause, unless multiple columns are in the main query for the subquery to compare its selected columns.

  • An ORDER BY command cannot be used in a subquery, although the main query can use an ORDER BY. The GROUP BY command can be used to perform the same function as the ORDER BY in a subquery.

  • Subqueries that return more than one row can only be used with multiple value operators such as the IN operator.

  • The SELECT list cannot include any references to values that evaluate to a BLOB, ARRAY, CLOB, or NCLOB.

...End of Excerpt. Please purchase the magazine to read the full article.