### Oracle SQL Datetime Format Elements - Examples Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/Format-Models Demonstrates the usage of specific Oracle SQL datetime format elements, such as FF for fractional seconds and TO_CHAR for converting timestamps. These examples illustrate how to format datetime values according to specified patterns. ```sql SELECT TO_CHAR(SYSTIMESTAMP, 'SS.FF3') from dual; ``` -------------------------------- ### Oracle SQL Number Formatting Examples Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/Format-Models Illustrates the usage of different number format elements in Oracle SQL. These examples demonstrate how to apply formatting for commas, periods, currency symbols, leading/trailing zeros, scientific notation, and more. ```SQL SELECT TO_CHAR(12345.67, '9,999,999.99') FROM DUAL; -- Example output: 12,345.67 SELECT TO_CHAR(12345.67, '$99,999.99') FROM DUAL; -- Example output: $12,345.67 SELECT TO_CHAR(123, '00000') FROM DUAL; -- Example output: 00123 SELECT TO_CHAR(-123, '999MI') FROM DUAL; -- Example output: 123- SELECT TO_CHAR(-123, '999PR') FROM DUAL; -- Example output: (123) SELECT TO_CHAR(15, 'RN') FROM DUAL; -- Example output: XV SELECT TO_CHAR(15, 'rn') FROM DUAL; -- Example output: xv SELECT TO_CHAR(1234, 'S9999') FROM DUAL; -- Example output: +1234 SELECT TO_CHAR(-1234, '9999S') FROM DUAL; -- Example output: 1234- SELECT TO_CHAR(12345.67, '9.9EEEE') FROM DUAL; -- Example output: 1.2345E+04 SELECT TO_CHAR(12345.67, '9G999G99D99') FROM DUAL; -- Example output: 12,345.67 (assuming NLS_NUMERIC_CHARACTER is set to default) SELECT TO_CHAR(12345.67, 'L99,999.99') FROM DUAL; -- Example output: $12,345.67 (assuming NLS_CURRENCY is set to $) SELECT TO_CHAR(12345.67, 'U99,999.99') FROM DUAL; -- Example output: €12,345.67 (assuming NLS_DUAL_CURRENCY is set to €) SELECT TO_CHAR(123.45, '999V99') FROM DUAL; -- Example output: 12345.00 SELECT TO_CHAR(255, 'X') FROM DUAL; -- Example output: FF SELECT TO_CHAR(255, '0X') FROM DUAL; -- Example output: 0FF ``` -------------------------------- ### Database Startup and Shutdown Commands Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Plus-Commands Commands for starting up and shutting down an Oracle database with various options for different modes and states. ```sql STARTUP { db_options | cdb_options | upgrade_options } Where `db_options` has the following syntax: [FORCE] [RESTRICT] [PFILE=filename] [QUIET] [ MOUNT [dbname] | [ OPEN [open_db_options] [dbname] ] | NOMOUNT ] Where `open_db_options` has the following syntax: READ {ONLY | WRITE [RECOVER]} | RECOVER Where `cdb_options` has the following syntax: root_connection_options | pdb_connection_options Where `root_connection_options` has the following syntax: PLUGGABLE DATABASE pdbname [FORCE] | [RESTRICT] [ OPEN {open_pdb_options} ] Where `pdb_connection_options` has the following syntax: [FORCE] | [RESTRICT] [ OPEN {open_pdb_options} ] Where `open_pdb_options` has the following syntax: READ WRITE | READ ONLY Where `upgrade_options` has the following syntax: [PFILE=filename] {UPGRADE | DOWNGRADE} [QUIET] ``` ```sql SHUTDOWN [ ABORT | IMMEDIATE | NORMAL | TRANSACTIONAL [LOCAL] ] ``` -------------------------------- ### SQL*Plus SQL Buffer File Management Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Plus-Commands Commands for editing, getting, and saving the contents of the SQL buffer to and from files. ```sql EDIT [ filename [ .ext ] ] ``` ```sql GET filename [ .ext ] [ LIST | NOLLIST ] ``` ```sql SAVE filename [ .ext ] [ CREATE | REPLACE | APPEND ] ``` -------------------------------- ### RETAIL_START_END Functions Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Functions Returns the start or end date of a retail period (year, quarter, month, week). ```APIDOC ## RETAIL_START_END Functions (RETAIL_YEAR_START_DATE, RETAIL_MONTH_END_DATE, etc.) ### Description Returns the start or end date of a specified retail period (year, quarter, month, week), considering restated periods. ### Method N/A (SQL Function) ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```sql SELECT RETAIL_MONTH_START_DATE(SYSDATE) FROM dual; ``` ### Response #### Success Response (200) Returns the start or end date of the retail period. #### Response Example ```json { "retail_period_date": "2023-12-01" } ``` ``` -------------------------------- ### RETAIL_START_END Date Functions Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Functions This group of Oracle SQL functions (e.g., RETAIL_YEAR_START_DATE, RETAIL_QUARTER_END_DATE) returns the start or end date for a specified retail period (year, quarter, month, week) based on a given date expression. They can also handle restated data. ```sql { RETAIL_YEAR_START_DATE | RETAIL_YEAR_END_DATE | RETAIL_QUARTER_START_DATE | RETAIL_QUARTER_END_DATE | RETAIL_MONTH_START_DATE | RETAIL_MONTH_END_DATE | RETAIL_WEEK_START_DATE | RETAIL_WEEK_END_DATE }( dtexpr [ , is_restated] ] ) ``` -------------------------------- ### SQL*Plus Help and Host Command Execution Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Plus-Commands Commands to access SQL*Plus help topics and execute operating system commands directly from the SQL*Plus environment. ```sql HELP [ INDEX | topic ] ``` ```sql HOST [ command ] ``` -------------------------------- ### FISCAL_START_END Functions Syntax Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Functions Returns the start or end date of a fiscal year. Requires a date expression and optionally a fiscal year start parameter. ```sql { FISCAL_YEAR_START_DATE | FISCAL_YEAR_END_DATE | ``` -------------------------------- ### Open Keystore Command Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/Subclauses Command to open a keystore, optionally forcing it, and specifying the password or external store. It can apply to all or the current container. ```sql open_keystore ::= SET KEYSTORE OPEN [ FORCE KEYSTORE ] IDENTIFIED BY { EXTERNAL STORE | keystore_password } [ CONTAINER = { ALL | CURRENT } ] ``` -------------------------------- ### SYS_GUID Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Functions Generates a globally unique identifier (GUID). ```APIDOC ## SYS_GUID() ### Description Generates a globally unique identifier (GUID). ### Method N/A (SQL Function) ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```sql SELECT SYS_GUID() FROM dual; ``` ### Response #### Success Response (200) - **guid** (RAW(16)) - The generated GUID. #### Response Example ```json { "example": "A0B1C2D3E4F5G6H7I8J9K0L1M2N3O4P5" } ``` ``` -------------------------------- ### Open Keystore Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/Subclauses Opens a keystore, optionally forcing it and specifying authentication. ```APIDOC ## Open Keystore ### Description Opens a keystore, optionally forcing it and specifying authentication. ### Method N/A (Syntax Definition) ### Endpoint N/A (Syntax Definition) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ``` SET KEYSTORE OPEN [ FORCE KEYSTORE ] IDENTIFIED BY { EXTERNAL STORE | keystore_password } [ CONTAINER = { ALL | CURRENT } ] ``` ### Response #### Success Response (200) N/A (Syntax Definition) #### Response Example N/A (Syntax Definition) ``` -------------------------------- ### Create PFILE (Oracle SQL) Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Statements Creates a parameter file (PFILE) from an existing server parameter file (SPFILE) or from memory. This file contains initialization parameters for the Oracle instance. ```sql CREATE PFILE [= 'pfile_name' ] FROM { SPFILE [= 'spfile_name'] | MEMORY } ``` -------------------------------- ### CON_ID_TO_GUID Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Functions Converts a container ID to its corresponding container GUID. ```APIDOC ## CON_ID_TO_GUID ### Description Converts a container ID to its corresponding container GUID. ### Method N/A (SQL Function) ### Endpoint N/A (SQL Function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```sql SELECT CON_ID_TO_GUID(container_guid) FROM dual ``` ### Response #### Success Response (200) - **container_guid** (string) - The container GUID. #### Response Example ```json { "container_guid": "A1B2C3D4-E5F6-7890-1234-567890ABCDEF" } ``` ``` -------------------------------- ### Create Keystore Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/Subclauses Specifies the syntax for creating an Oracle keystore. It allows for either a standard keystore at a specified location or an auto-login keystore. The keystore must be identified by a password. ```sql CREATE { KEYSTORE 'keystore_location' | [ LOCAL ] AUTO_LOGIN KEYSTORE FROM KEYSTORE 'keystore_location' } IDENTIFIED BY keystore_password ``` -------------------------------- ### CON_GUID_TO_ID Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Functions Converts a container GUID to its corresponding container ID. ```APIDOC ## CON_GUID_TO_ID ### Description Converts a container GUID to its corresponding container ID. ### Method N/A (SQL Function) ### Endpoint N/A (SQL Function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```sql SELECT CON_GUID_TO_ID(container_guid) FROM dual ``` ### Response #### Success Response (200) - **container_id** (number) - The container ID. #### Response Example ```json { "container_id": 1 } ``` ``` -------------------------------- ### REGEXP_INSTR Function Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Functions Returns the starting position of the Nth occurrence of a pattern within a string. ```APIDOC ## REGEXP_INSTR ### Description Returns the starting position of the Nth occurrence of a regular expression pattern within a source character string. ### Method N/A (SQL Function) ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```sql SELECT REGEXP_INSTR('This is a test string', 'is', 1, 2) FROM dual; ``` ### Response #### Success Response (200) Returns the starting position of the Nth occurrence. #### Response Example ```json { "position": 5 } ``` ``` -------------------------------- ### Oracle SQL Rolling Patch Clauses Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/Subclauses Controls the rolling patch process, allowing starting and stopping. ```sql rolling_patch_clauses: { START ROLLING PATCH | STOP ROLLING PATCH } ``` -------------------------------- ### SQL*Plus Login and Connection Commands Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Plus-Commands Commands to log in to SQL*Plus, connect to a database with various authentication methods, and specify connection options. ```sql SQLPLUS [ [{username[/password][@connect_identifier] | / } [AS {SYSASM|SYSBACKUP|SYSDBA|SYSDG|SYSOPER|SYSKM}] [edition=value]] | /NOLOG ] ``` ```sql CONNECT [{username[/password] [@connect_identifier] | / | proxy_user [ username ] [/password] [@connect_identifier]} [AS {SYSASM|SYSBACKUP|SYSDBA|SYSDG|SYSOPER |SYSKM}] [edition=value] ] ``` -------------------------------- ### Prepare Clause Syntax Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/Subclauses Prepares a mirror copy of a database, specifying redundancy levels and the target CDB name. ```sql prepare_clause ::= PREPARE MIRROR COPY copy_name [ WITH { EXTERNAL | NORMAL | HIGH } REDUNDANCY ] [ FOR DATABASE target_cdb_name ] ``` -------------------------------- ### General Utility Functions Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Functions This section includes general utility functions like VSIZE and WIDTH_BUCKET. ```APIDOC ## General Utility Functions ### VSIZE #### Description Returns the storage size of an expression in bytes. ### Method N/A (SQL Function) ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```sql SELECT VSIZE(column_name) FROM my_table; ``` ### Response #### Success Response (200) Returns the size of the expression in bytes. #### Response Example ```json { "size_in_bytes": 100 } ``` --- ### WIDTH_BUCKET #### Description Returns the bucket number to which a value belongs within a specified range and number of buckets. ### Method N/A (SQL Function) ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```sql SELECT WIDTH_BUCKET(value, min_val, max_val, num_buckets) FROM my_table; ``` ### Response #### Success Response (200) Returns the bucket number. #### Response Example ```json { "bucket_number": 5 } ``` ``` -------------------------------- ### Oracle SQL Rolling Migration Clauses Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/Subclauses Controls the rolling migration process for database versions, allowing starting and stopping. ```sql rolling_migration_clauses: { START ROLLING MIGRATION TO 'ASM_version' | STOP ROLLING MIGRATION } ``` -------------------------------- ### Create Directory Syntax Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Statements Creates or replaces a directory object, which is an alias for a specific file system path. The directory can be shared or not. Requires a path name. ```sql CREATE [ OR REPLACE ] DIRECTORY [IF NOT EXISTS ] directory [ SHARING = { METADATA | NONE } ] AS 'path_name' ``` -------------------------------- ### Create PDB from Mirror Copy Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/Subclauses Specifies the command to create a new pluggable database (PDB) from an existing mirror copy. It requires the new PDB name, the base PDB name, the database link, and the name of the mirror copy. ```sql new_pdb_name FROM base_pdb_name @dblinkname USING MIRROR COPY mirror_name ``` -------------------------------- ### DUMP Function Syntax Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Functions Returns a variant of expr in a specified return format. It can also specify start position and length for the dump. ```sql DUMP(expr[, return_fmt [, start_position [, length ]]]) ``` -------------------------------- ### Period Definition Syntax Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/Subclauses Defines a period for a table based on a valid time column. It can optionally include start and end time columns. ```sql period_definition ::= PERIOD FOR valid_time_column [ ( start_time_column, end_time_column ) ] ``` -------------------------------- ### CREATE PFILE Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Statements Creates a traditional parameter file (PFILE) from a server parameter file (SPFILE) or from the current memory settings. ```APIDOC ## CREATE PFILE ### Description Creates a traditional parameter file (PFILE) from a server parameter file (SPFILE) or from the current memory settings. ### Method CREATE ### Endpoint N/A (SQL Command) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```sql CREATE PFILE= '/path/to/my_init.ora' FROM SPFILE= '/path/to/my_spfile.ora'; ``` ### Response #### Success Response (200) None (SQL Command) #### Response Example None (SQL Command) ``` -------------------------------- ### Create PDB from XML Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/Subclauses Syntax for creating a pluggable database (PDB) from an XML file. It supports options for cloning, file copying or moving, service name conversion, and various storage and configuration clauses similar to other PDB creation methods. ```sql [ AS CLONE ] USING filename [ source_file_name_convert | source_file_directory ] [ { [ COPY | MOVE ] file_name_convert } | NOCOPY ] [ service_name_convert ] [ default_tablespace ] [ pdb_storage_clause ] [ path_prefix_clause ] [ tempfile_reuse_clause ] [ user_tablespaces_clause ] [ standbys_clause ] [ logging_clause ] [ create_file_dest_clause ] [ HOST = 'hostname' ] [ PORT = number ] ``` -------------------------------- ### SYS_GUID Function Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Functions Generates a globally unique identifier (GUID). This function is commonly used to create unique primary keys or identifiers for records. ```sql SYS_GUID( ) ``` -------------------------------- ### NTH_VALUE Function in Oracle SQL Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Functions NTH_VALUE returns the value of the measure expression at the nth row within its partition. It supports specifying the starting point (FIRST/LAST) and null handling. ```sql NTH_VALUE(measure_expr, n) [ FROM { FIRST | LAST } ][ { RESPECT | IGNORE } NULLS ] OVER { window_name | analytic_clause } ``` -------------------------------- ### Backup Keystore Syntax Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/Subclauses Command to back up the Oracle keystore. It allows specifying a backup identifier, forcing the backup, identifying the keystore with a password or external store, and specifying a destination location. ```sql backup_keystore ::= BACKUP KEYSTORE [ USING 'backup_identifier' ] [ FORCE KEYSTORE ] IDENTIFIED BY { EXTERNAL STORE | keystore_password } [ TO 'keystore_location' ] ``` -------------------------------- ### Backup Keystore Clause Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/Subclauses Command to back up the database keystore. ```APIDOC ## Backup Keystore Clause ### Description Provides the syntax for creating a backup of the Oracle Wallet or keystore, securing sensitive cryptographic keys. ### Method N/A (SQL Syntax Definition) ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response (200) N/A #### Response Example N/A ``` backup_keystore ::= BACKUP KEYSTORE [ USING 'backup_identifier' ] [ FORCE KEYSTORE ] IDENTIFIED BY { EXTERNAL STORE | keystore_password } [ TO 'keystore_location' ] ``` ``` -------------------------------- ### Oracle SQL Container ID Conversion Functions Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Functions These functions convert container identifiers between different formats (DBID, GUID, ID, UID). They are essential for managing multitenant environments. ```sql CON_DBID_TO_ID(container_dbid) ``` ```sql CON_GUID_TO_ID(container_guid) ``` ```sql CON_ID_TO_CON_NAME(container_guid) ``` ```sql CON_ID_TO_DBID(container_guid) ``` ```sql CON_ID_TO_GUID(container_guid) ``` ```sql CON_ID_TO_UID(container_guid) ``` ```sql CON_NAME_TO_ID(container_name) ``` ```sql CON_UID_TO_ID(container_uid) ``` -------------------------------- ### Create Flashback Archive Syntax Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Statements Creates a flashback archive, which stores historical data for tables. Requires specifying the tablespace, retention period, and optional optimization settings. ```sql CREATE FLASHBACK ARCHIVE [DEFAULT] flashback_archive TABLESPACE tablespace [flashback_archive_quota] [ [NO] OPTIMIZE DATA ] flashback_archive_retention ``` -------------------------------- ### FISCAL Date Functions Syntax Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Functions Extracts fiscal year, quarter, month, week, or day from a date expression. Optional parameters include fiscal year start date and formatting. ```sql { FISCAL_YEAR | FISCAL_QUARTER | FISCAL_MONTH | FISCAL_WEEK | FISCAL_DAY } ( dtexpr [ , fiscal_year_start ] [ , fmt][ , nlsparam ] ) ``` -------------------------------- ### SQL*Plus Command Execution from Buffer Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Plus-Commands Commands to execute SQL statements stored in the SQL buffer, either individually or as a batch. ```sql / ``` ```sql RUN ``` -------------------------------- ### REGEXP_COUNT Function Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Functions The REGEXP_COUNT function in Oracle SQL counts the number of occurrences of a pattern within a source character string. It supports specifying a starting position and matching parameters for advanced control. ```sql REGEXP_COUNT (source_char, pattern [, position [, match_param]]) ``` -------------------------------- ### Alter Sequence Statement in Oracle SQL Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Statements Modifies sequence properties such as increment, start value, maximum/minimum values, cycle behavior, caching, ordering, and scaling. Supports session or global scope. ```sql ALTER SEQUENCE [ IF EXISTS ][ schema. ] sequence { { INCREMENT BY | START WITH } integer | { MAXVALUE integer | NOMAXVALUE } | { MINVALUE integer | NOMINVALUE } | RESTART | { CYCLE | NOCYCLE } | { CACHE integer | NOCACHE } | { ORDER | NOORDER } | { KEEP | NOKEEP } | { SCALE {EXTEND | NOEXTEND} | NOSCALE } | { SHARD {EXTEND | NOEXTEND} | NOSHARD } | { SESSION | GLOBAL } } ... ``` -------------------------------- ### Create PDB Clone Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/Subclauses Syntax for creating a pluggable database (PDB) by cloning an existing PDB or a non-CDB database. It supports various clauses for specifying source, storage, file conversion, services, and relocation options. Snapshot copies can also be utilized. ```sql { { FROM { src_pdb_name [ @ dblink ] } | { NON$CDB @ dblink } } | { AS PROXY FROM src_pdb_name @ dblink } } [ parallel_pdb_creation_clause ] [ default_tablespaces ] [ pdb_storage_clause ] [ file_name_convert ] [ service_name_convert ] [ path_prefix_clause ] [ tempfile_reuse_clause ] [ SNAPSHOT COPY ] [ user_tablespaces_clause ] [ standbys_clause ] [ logging_clause ] [ create_file_dest_clause ] [ keystore_clause ] [ pdb_refresh_mode_clause ] [ RELOCATE [ KEEP SOURCE ] [ AVAILABILITY {MAX | NORMAL} ] pdb_refresh_mode_clause ] [ NO DATA ] [ HOST = 'hostname' ] [ PORT = number ] ``` -------------------------------- ### Oracle SQL Date and Time Functions Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Functions Functions for manipulating and extracting information from date and time values. Includes functions for fiscal periods, flooring dates, and getting the last day of a month. ```SQL FISCAL_QUARTER_START_DATE | FISCAL_QUARTER_END_DATE | FISCAL_MONTH_START_DATE | FISCAL_MONTH_END_DATE | FISCAL_WEEK_START_DATE | FISCAL_WEEK_END_DATE } ( dtexpr [ , fiscal_year_start] [ , nlsparam ] ) ``` ```SQL FLOOR(datetime) ``` ```SQL FLOOR ( datetimes [ , fmt ] ) ``` ```SQL FLOOR ( interval [ , fmt ] ) ``` ```SQL LAST_DAY(date) ``` -------------------------------- ### Build Clause Syntax Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/Subclauses Specifies when an index should be built. Options include building immediately or deferring the build process. ```sql build_clause ::= BUILD { IMMEDIATE | DEFERRED } ``` -------------------------------- ### Create PDB from Seed Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/Subclauses Defines the syntax for creating a pluggable database (PDB) from the PDB seed. This method requires specifying an administrative user and password, and allows for configuration of storage, file conversion, services, and other PDB properties. ```sql ADMIN USER admin_user_name IDENTIFIED BY password [ pdb_dba_roles ] [ parallel_pdb_creation_clause ] [ default_tablespace ] [ pdb_storage_clause ] [ file_name_convert ] [ service_name_convert ] [ path_prefix_clause ] [ tempfile_reuse_clause ] [ user_tablespaces_clause ] [ standbys_clause ] [ logging_clause ] [ create_file_dest_clause ] [ HOST = 'hostname' ] [ PORT = number ] ``` -------------------------------- ### FISCAL_X_OF_Y Functions Syntax Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Functions Returns the position of a fiscal period within a larger fiscal period (e.g., quarter of the year, day of the month). Requires date expression and optional fiscal year start. ```sql { FISCAL_YEAR_NUMBER ( dtexpr [ , fis_year_start ] [ , nlsparam ] ) ) | (FISCAL_QUARTER_OF_YEAR ( dtexpr [ , fiscal_year_start ] [ , nlsparam ] ) ) | (FISCAL_MONTH_OF_YEAR ( dtexpr [ , fiscal_year_start ] [ , index_by ][ , nlsparam ] )) | (FISCAL_MONTH_OF_QUARTER ( dtexpr [ , fiscal_year_start ][ , nlsparam ] )) | (FISCAL_WEEK_OF_YEAR ( dtexpr [ , fiscal_year_start ][ , nlsparam ] )) | (FISCAL_DAY_OF_YEAR ( dtexpr [ , fiscal_year_start ][ , nlsparam ] ) ) | (FISCAL_DAY_OF_QUARTER ( dtexpr [ , fiscal_year_start ][ , nlsparam ] )) | (FISCAL_DAY_OF_MONTH ( dtexpr [ , fiscal_year_start ][ , nlsparam ] ) ) | (FISCAL_DAY_OF_WEEK ( dtexpr [ , fiscal_year_start ][ , index_by ] [ , nlsparam ] ) } ``` -------------------------------- ### Create Library Syntax Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Statements Creates or replaces a PL/SQL library, which is a schema object that contains PL/SQL code. Supports editioning and can be created if it does not exist. ```sql CREATE [ OR REPLACE ] [ EDITIONABLE | NONEDITIONABLE ] LIBRARY [IF NOT EXISTS ] plsql_library_source ``` -------------------------------- ### FISCAL_ADD_X_PERIODS Functions Syntax Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Functions Adds a specified number of fiscal periods (years, quarters, months, weeks, days) to a date expression. Requires the date, number of periods, and optionally fiscal year start. ```sql { FISCAL_ADD_YEARS | FISCAL_ADD_QUARTERS | FISCAL_ADD_MONTHS | FISCAL_ADD_WEEKS | FISCAL_ADD_DAYS } ( dtexpr , num_periods [, fiscal_year_start] [ , nlsparam ] ) ``` -------------------------------- ### Create Domain Syntax Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Statements Defines a domain, which is a schema object that specifies a set of valid values for a column or a set of columns. Supports single-column, multi-column, and flexible domain creation. ```sql { create_single_column_domain | create_multi_column_domain | create_flexible_domain } ``` -------------------------------- ### Oracle SQL: DROP OUTLINE Statement Syntax Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Statements The DROP OUTLINE statement removes a stored outline, which is used to guide the optimizer's plan selection. This command affects query performance tuning. ```sql DROP OUTLINE outline ``` -------------------------------- ### MERGE KEYSTORE Operations (SQL) Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/Subclauses Provides syntax for merging keystore information between different keystores. This includes options for identifying keystores, specifying passwords, and handling backups. ```sql MERGE KEYSTORE 'keystore1_location' [ IDENTIFIED BY keystore1_password ] INTO EXISTING KEYSTORE 'keystore2_location' IDENTIFIED BY { EXTERNAL STORE | keystore2_password } WITH BACKUP [ USING 'backup_identifier' ] ``` ```sql MERGE KEYSTORE 'keystore1_location' [ IDENTIFIED BY keystore1_password ] AND KEYSTORE 'keystore2_location' [ IDENTIFIED BY keystore2_password ] INTO NEW KEYSTORE 'keystore3_location' IDENTIFIED BY { EXTERNAL STORE | keystore3_password } ``` -------------------------------- ### Create Sequence Statement in Oracle SQL Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Statements Details the syntax for creating a sequence in Oracle SQL. It supports various options like increment, start value, max/min values, cycle, cache, order, and sharing. ```sql CREATE SEQUENCE [IF NOT EXISTS ] [ schema. ] sequence [ SHARING = { METADATA | DATA | NONE } ] [ { INCREMENT BY | START WITH } integer | { MAXVALUE integer | NOMAXVALUE } | { MINVALUE integer | NOMINVALUE } | { CYCLE | NOCYCLE } | { CACHE integer | NOCACHE } | { ORDER | NOORDER } | { KEEP | NOKEEP } | { SCALE {EXTEND | NOEXTEND} | NOSCALE } | { SHARD {EXTEND | NOEXTEND} | NOSHARD } | { SESSION | GLOBAL } ]... ``` -------------------------------- ### Oracle SQL JSON Data Guide and Table Functions Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Functions Functions for analyzing JSON data structure and converting JSON to relational format. JSON_DATAGUIDE analyzes JSON content, and JSON_TABLE transforms JSON into relational rows and columns. ```SQL JSON_DATAGUIDE ( expr [ , format [ , flag ] ] ) ``` ```SQL JSON_TABLE ( expr [ FORMAT JSON ] [ , JSON_basic_path_expression ] [ JSON_table_on_error_clause ] [ TYPE ( { STRICT | LAX } ) ] JSON_columns_clause ) ``` -------------------------------- ### Create Index Syntax Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Statements Creates a unique, bitmap, or regular index on a table, cluster, or for bitmap join. Supports specifying index usability and invalidation options. ```sql CREATE [ UNIQUE | BITMAP ] INDEX [IF NOT EXISTS ][ schema. ] index_name [ index_ilm_clause ] ON { cluster_index_clause | table_index_clause | bitmap_join_index_clause } [ USABLE | UNUSABLE ] [ { DEFERRED | IMMEDIATE } INVALIDATION ] ``` -------------------------------- ### Substring Functions Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Functions Functions to extract a portion of a character string. `SUBSTR`, `SUBSTRB`, `SUBSTRC`, `SUBSTR2`, and `SUBSTR4` all extract substrings but may differ in their handling of multi-byte characters or character sets. They require the string, a starting position, and an optional length. ```SQL { SUBSTR | SUBSTRB | SUBSTRC | SUBSTR2 | SUBSTR4 } (char, position [, substring_length ]) ``` -------------------------------- ### Create Multi Column Domain Syntax Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Statements Creates a domain for multiple columns, defining each column's name, data type, strictness, properties, display, order, and annotations. Supports schema qualification. ```sql CREATE [ USECASE ] DOMAIN [ IF NOT EXISTS ][ schema .] domain_name AS ( domain_column AS datatype [ STRICT ] [ column_properties_clause ] [, domain_column AS datatype [ STRICT ] [ column_properties_clause ] ) [DISPLAY display_expression ] [ORDER order_expression ] [annotations_clause ] ``` -------------------------------- ### Explain Plan Statement Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Statements Generates an execution plan for a SQL statement. The plan can be stored in a table. ```sql EXPLAIN PLAN [ SET STATEMENT_ID = string ] [ INTO [ schema. ] table [ @ dblink ] ] FOR statement ``` -------------------------------- ### Materialized View Refresh Clause Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/Subclauses Defines the refresh behavior for materialized views in Oracle. It supports different refresh modes (FAST, COMPLETE, FORCE), refresh triggers (ON DEMAND, ON COMMIT, ON STATEMENT), scheduling options (START WITH, NEXT), and methods for identifying changes (PRIMARY KEY, ROWID). ```sql { REFRESH { { FAST | COMPLETE | FORCE } | { ON DEMAND | ON COMMIT | ON STATEMENT } | { START WITH date | NEXT date }... | WITH { PRIMARY KEY | ROWID } | USING { DEFAULT [ MASTER | LOCAL ] ROLLBACK SEGMENT | [ MASTER | LOCAL ] ROLLBACK SEGMENT rollback_segment }... | USING { ENFORCED | TRUSTED } CONSTRAINTS }... | NEVER REFRESH } ``` -------------------------------- ### Sample Clause Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/Subclauses Specifies a sample of data to be used, either by block or by percentage. ```APIDOC ## Sample Clause ### Description Allows for the selection of a random sample of data. Sampling can be done at the block level or by specifying a percentage of rows. An optional seed can be provided for reproducible results. ### Method N/A (Syntax definition) ### Endpoint N/A (Syntax definition) ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response (200) N/A #### Response Example N/A ```bnf sample_clause ::= SAMPLE [ BLOCK ] (sample_percent) [ SEED (seed_value) ] ``` ``` -------------------------------- ### CREATE PACKAGE Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Statements Creates or replaces a PL/SQL package specification, defining the public interface of the package. ```APIDOC ## CREATE PACKAGE ### Description Creates or replaces a PL/SQL package specification, defining the public interface of the package. ### Method CREATE ### Endpoint N/A (SQL Command) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```sql CREATE OR REPLACE PACKAGE my_package AS PROCEDURE greet(p_name IN VARCHAR2); END my_package; / ``` ### Response #### Success Response (200) None (SQL Command) #### Response Example None (SQL Command) ``` -------------------------------- ### Configure Supplemental Logging for Tables Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/Subclauses Allows adding or dropping supplemental logging for tables. This can include logging all columns, primary keys, unique keys, or foreign keys. It also supports specifying PL/SQL or subset replication clauses. ```sql { ADD | DROP } SUPPLEMENTAL LOG { DATA | supplemental_id_key_clause | supplemental_plsql_clause | supplemental_subset_replication_clause } ``` -------------------------------- ### Switch Logfiles with Blocksize Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/Subclauses Forces a switch of all logfiles and sets a new block size for the logfiles. This is typically used for administrative tasks or specific performance tuning. ```sql SWITCH ALL LOGFILES TO BLOCKSIZE integer ``` -------------------------------- ### Define Set Key Syntax Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/Subclauses Specifies the syntax for setting an encryption key, using a master key identifier (mkid:mk) or a master key (mk). Options include using a tag, algorithm, and specifying the keystore identification. ```sql set_key ::= SET [ ENCRYPTION ] KEY { mkid:mk | mk } [ USING TAG 'tag' ] [ USING ALGORITHM 'encrypt_algorithm' ] [ FORCE KEYSTORE ] IDENTIFIED BY { EXTERNAL STORE | keystore_password } ``` -------------------------------- ### Define Sample Clause Syntax Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/Subclauses Specifies the SAMPLE clause for data sampling, including an optional BLOCK qualifier, a sample percentage, and an optional SEED value for reproducibility. ```sql sample_clause ::= SAMPLE [ BLOCK ] (sample_percent) [ SEED (seed_value) ] ``` -------------------------------- ### CREATE PROFILE Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Statements Creates a profile, which is a collection of resource limits and password management policies that can be assigned to users. ```APIDOC ## CREATE PROFILE ### Description Creates a profile, which is a collection of resource limits and password management policies that can be assigned to users. ### Method CREATE ### Endpoint N/A (SQL Command) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```sql CREATE PROFILE app_user_profile LIMIT SESSIONS_PER_USER UNLIMITED CPU_PER_SESSION 3000 PASSWORD_LIFE_TIME 90; ``` ### Response #### Success Response (200) None (SQL Command) #### Response Example None (SQL Command) ``` -------------------------------- ### Create Flexible Domain Syntax Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Statements Creates a flexible domain, allowing for conditional data type assignments based on discriminant columns. Uses DECODE or case expressions to define the mapping. ```sql CREATE [ USECASE ] FLEXIBLE DOMAIN [IF NOT EXISTS ][ schema .]domain_name ( domain_column [ , domain_column... ] ) CHOOSE DOMAIN USING ( domain_discriminant_column datatype)[ , domain_discriminant_column datatype...] ) FROM { DECODE (expr , search_expr , result_expr [, search_expr , result_expr ]... [ , default ] ) | case_expression } ``` -------------------------------- ### USERENV Function Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Functions Returns information about the current session environment. It takes a parameter to specify the type of information to retrieve (e.g., 'IP_ADDRESS', 'SESSION_USER'). ```sql USERENV('parameter') ``` -------------------------------- ### SQL*Plus System Variable Management Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Plus-Commands Commands to display and alter SQL*Plus system variables and environment settings. ```sql SHOW { ALL | ERRORS | USER | system_variable [, system_variable] ...} ``` ```sql SET system_variable value ``` -------------------------------- ### SQL*Plus Spooling and Script Execution Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Plus-Commands Commands for capturing query results to a file (spooling) and executing SQL*Plus statements stored in files. ```sql SPOOL [ filename[ .ext ] [ CREATE | REPLACE | APPEND ] | OFF | OUT ] ``` ```sql @ { url | filename [ .ext ] } [ arg ... ]START { url | filename [ .ext ] } [ arg ... ] ext can be omitted if the filename extension is .sql ``` -------------------------------- ### Define Set Encryption Key Syntax Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/Subclauses Specifies the syntax for setting an encryption key, identifying it by wallet password or OKV password, with options for backup and migration. ```sql set_encryption_key ::= { SET ENCRYPTION KEY IDENTIFIED BY { "wallet_password" { WITH BACKUP USING backup_identifier | REVERSE MIGRATE USING "OKV_password" WITH BACKUP [ USING backup_identifier ] } | "OKV_password" MIGRATE USING "wallet_password" } } ``` -------------------------------- ### Create Java Syntax Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Statements Creates or replaces Java source, resource, or class objects within the database. Supports resolving, compiling, and sharing options, as well as various methods for specifying the Java code. ```sql CREATE [ OR REPLACE ] [ AND { RESOLVE | COMPILE } ] [ NOFORCE ] JAVA [IF NOT EXISTS ] { { SOURCE | RESOURCE } NAMED [ schema. ] primary_name | CLASS [ SCHEMA schema ] } [ SHARING = { METADATA | NONE } ] [ invoker_rights_clause ] [ RESOLVER ( (match_string [,] { schema_name | - })... ) ] { USING { BFILE (directory_object_name, server_file_name) | { CLOB | BLOB | BFILE } subquery | 'key_for_BLOB' } | AS source_char } ``` -------------------------------- ### SQL*Plus Object Description Command Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Plus-Commands Command to describe the structure of database objects such as tables, views, synonyms, functions, and procedures. ```sql DESCRIBE [ schema. ] object ``` -------------------------------- ### Utility and Data Handling Functions in Oracle SQL Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Functions Includes utility functions like BFILENAME, BIN_TO_NUM, and CARDINALITY. BFILENAME is used for accessing external files, BIN_TO_NUM converts binary strings to numbers, and CARDINALITY returns the number of elements in a nested table. ```SQL BFILENAME('directory', 'filename') BIN_TO_NUM(expr [, expr ]... ) CARDINALITY(nested_table) ``` -------------------------------- ### Create Edition Syntax Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Statements Creates a new edition, which is a schema object that enables an application to have multiple versions running concurrently. Editions can be created as children of existing editions. ```sql CREATE EDITION [IF NOT EXISTS ] edition [ AS CHILD OF parent_edition ] ``` -------------------------------- ### Create Hybrid Vector Index Syntax Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Statements Creates a hybrid vector index on a specified table and column(s). Requires a parameter string for index configuration. ```sql CREATE HYBRID VECTOR INDEX [schema.]index_name ON [schema.]table_name(index_column_name) PARAMETERS ('paramstring') ``` -------------------------------- ### On Hash Partitioned Table Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/Subclauses Specifies storage and partitioning for hash-partitioned tables. ```APIDOC ## On Hash Partitioned Table ### Description Specifies storage and partitioning for hash-partitioned tables. ### Method N/A (Syntax Definition) ### Endpoint N/A (Syntax Definition) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ``` { STORE IN (tablespace[, tablespace ]...) | (PARTITION [ partition ] [ TABLESPACE tablespace ] [ index_compression ] [ USABLE | UNUSABLE ] [, PARTITION [ partition ] [ TABLESPACE tablespace ] [ index_compression ] [ USABLE | UNUSABLE ]] ... ) } ``` ### Response #### Success Response (200) N/A (Syntax Definition) #### Response Example N/A (Syntax Definition) ``` -------------------------------- ### Oracle SQL Hash Partitioning by Quantity Syntax Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/Subclauses Specifies how to define hash partitions by a specific quantity in Oracle SQL. This includes options for tablespace allocation and overflow storage. ```sql hash_partitions_by_quantity ::= PARTITIONS hash_partition_quantity [ STORE IN (tablespace [, tablespace ]... ) ] [ table_compression | index_compression ] [ OVERFLOW STORE IN (tablespace [, tablespace ]...) ] ``` -------------------------------- ### Create Pluggable Database (Oracle SQL) Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Statements Creates a pluggable database (PDB), which is a portable and self-contained database. PDBs can be created from a seed, cloned from another PDB, or created from an XML file or mirror copy. ```sql CREATE PLUGGABLE DATABASE { { pdb_name [ AS APPLICATION CONTAINER ] } | { AS SEED } } { create_pdb_from_seed | create_pdb_clone | create_pdb_from_xml | create_pdb_from_mirror_copy | using_snapshot_clause | container_map_clause } pdb_snapshot_clause; ``` -------------------------------- ### Source File Directory Syntax in Oracle SQL Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/Subclauses Defines the directory path for source files, or specifies NONE if no directory is used. ```sql SOURCE_FILE_DIRECTORY = { 'directory_path_name' | NONE } ``` -------------------------------- ### On Component Partitioned Table Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/Subclauses Specifies storage and partitioning for component-partitioned tables. ```APIDOC ## On Component Partitioned Table ### Description Specifies storage and partitioning for component-partitioned tables. ### Method N/A (Syntax Definition) ### Endpoint N/A (Syntax Definition) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ``` [ STORE IN ( tablespace [, tablespace ]... ) ] ( PARTITION [ partition ] [ { segment_attributes_clause | index_compression }... ] [ USABLE | UNUSABLE ] [ index_subpartition_clause ] [, PARTITION [ partition ] [ { segment_attributes_clause | index_compression }... ] [ USABLE | UNUSABLE ] [ index_subpartition_clause ] ]... ) ``` ### Response #### Success Response (200) N/A (Syntax Definition) #### Response Example N/A (Syntax Definition) ``` -------------------------------- ### CREATE PLUGGABLE DATABASE Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Statements Creates a pluggable database (PDB) within a multitenant container database. PDBs can be created from a seed, cloned from another PDB, or created from an XML file. ```APIDOC ## CREATE PLUGGABLE DATABASE ### Description Creates a pluggable database (PDB) within a multitenant container database. PDBs can be created from a seed, cloned from another PDB, or created from an XML file. ### Method CREATE ### Endpoint N/A (SQL Command) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```sql CREATE PLUGGABLE DATABASE pdb1 FROM pdb_seed FILE_NAME_CONVERT = ('/pdbseed/','/pdb1/'); ``` ### Response #### Success Response (200) None (SQL Command) #### Response Example None (SQL Command) ``` -------------------------------- ### Oracle SQL: Close Keystore Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/Subclauses Command to close a keystore, with options for authentication and container scope. ```sql SET KEYSTORE CLOSE [ IDENTIFIED BY { EXTERNAL STORE | keystore_password } ] [ CONTAINER = { ALL | CURRENT } ] ``` -------------------------------- ### Create MLE Environment (Oracle SQL) Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Statements Creates a Machine Learning Engine (MLE) environment, which is a container for MLE code. It can be cloned from an existing environment or configured with import statements and language options. ```sql CREATE [ OR REPLACE ] MLE ENV [IF NOT EXISTS][schema .] name ( [ CLONE [schema .] environment_name ] | ( [ IMPORTS ( ( 'import_name' MODULE [schema .] mle_module_name)[,(mle_module_name)...] ) ] [ LANGUAGE OPTIONS option_string ] ) ) [ PURE ] ``` -------------------------------- ### Enable Subset Replication Logging Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/Subclauses Enables supplemental logging for subset database replication. This clause specifies that the logging is intended for subset replication scenarios. ```sql DATA SUBSET DATABASE REPLICATION ``` -------------------------------- ### Table Partitioning Clauses Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/Subclauses Specifies the various methods for partitioning a table, including range, list, hash, composite, reference, system, directory-based, and consistent hash partitioning, along with partition sets. ```sql { range_partitions | list_partitions | hash_partitions | composite_range_partitions | composite_list_partitions | composite_hash_partitions | reference_partitioning | system_partitioning | consistent_hash_partitions | directory_based_partitions | composite_directory_based_partitions | consistent_hash_with_subpartitions | partitionset_clauses } ``` -------------------------------- ### CREATE MLE ENV Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Statements Creates a new Machine Learning Engine (MLE) environment or replaces an existing one. An MLE environment can be cloned from another environment or configured with import statements and language options. ```APIDOC ## CREATE MLE ENV ### Description Creates a new Machine Learning Engine (MLE) environment or replaces an existing one. An MLE environment can be cloned from another environment or configured with import statements and language options. ### Method CREATE ### Endpoint N/A (SQL Command) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```sql CREATE OR REPLACE MLE ENV my_mle_env ( IMPORTS ('my_module' MODULE my_schema.my_mle_module)) LANGUAGE OPTIONS '{"timeout": 60}'; ``` ### Response #### Success Response (200) None (SQL Command) #### Response Example None (SQL Command) ``` -------------------------------- ### Create Function Syntax Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Statements Creates or replaces a PL/SQL function. Supports editioning and can be created if it does not exist. Requires the PL/SQL function source code. ```sql CREATE [ OR REPLACE ] [ EDITIONABLE | NONEDITIONABLE ] FUNCTION [IF NOT EXISTS ] plsql_function_source ``` -------------------------------- ### TO_BLOB Function (BFILE) Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/SQL-Functions Converts a BFILE (Binary File) locator to a BLOB (Binary Large Object). It can optionally specify the MIME type. ```sql TO_BLOB( bfile [, mime_type] ) ``` -------------------------------- ### System Partitioning Strategy Source: https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlqr/Subclauses Defines table partitioning based on a system-generated scheme. It can specify the number of partitions or reference existing partition descriptions. ```sql PARTITION BY SYSTEM [ PARTITIONS integer | reference_partition_desc [, reference_partition_desc ...] ] ```