

# SqlQuery

A SQL statement for ExecuteSql to run, and the AWS Glue tables that the statement reads.

## Contents
<a name="API_SqlQuery_Contents"></a>

 ** statement **   <a name="context-Type-SqlQuery-statement"></a>
One read-only SELECT or WITH statement, without a trailing `;`, in PostgreSQL-compatible SQL as the query engine parses it. Double-quote every identifier: unquoted identifiers are upper-cased and matching is case-sensitive. Reference each table by its quoted, fully qualified AWS Glue table ARN, for example `SELECT "order_id" FROM "arn:aws:glue:us-east-1:111122223333:table/db/orders" LIMIT 10`. At most 50,000 rows are returned whatever the statement's own LIMIT.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 35000.  
Required: Yes

 ** tables **   <a name="context-Type-SqlQuery-tables"></a>
Every table the statement reads. The service does not parse the SQL to find tables, and the engine resolves only the tables listed here.  
Type: Array of [SqlTableReference](API_SqlTableReference.md) objects  
Array Members: Minimum number of 1 item. Maximum number of 10 items.  
Required: Yes

## See Also
<a name="API_SqlQuery_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS SDK for C\+\+](https://docs.aws.amazon.com/goto/SdkForCpp/context-2022-07-26/SqlQuery) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/context-2022-07-26/SqlQuery) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/context-2022-07-26/SqlQuery) 