sql query syntax code example

Example 1: sql query

$meta_query_args = array(
    'relation' => 'OR', // Optional, defaults to "AND"
    array(
        'key'     => '_my_custom_key',
        'value'   => 'Value I am looking for',
        'compare' => '='
    ),
    array(
        'relation' => 'AND',
        array(
            'key'     => '_my_custom_key_2',
            'value'   => 'Value I am looking for 2',
            'compare' => '='
        ),
        array(
            'key'     => '_my_custom_key_3',
            'value'   => 'Value I am looking for 3',
            'compare' => '='
        )
    )
);
$meta_query = new WP_Meta_Query( $meta_query_args );

Example 2: sql query examples

Select REGEXP FROM DUAL

Example 3: sql syntax

select [all/distinct] <COL1>, <COL2>, <COL3>
from <TABLE_NAME>
[join <JOIN_CONDITION>]
[where <CONDITION>]
[group by <COLUMN_NAME>]
[having <SEARCH_CONDITION>]
[order by <SORT_SPECIFICATION>]


/*
Specifically for SQL -> Oracle

LEGEND: 
[...]   :   optional entries
<...>   :   your specific entry
*/

Tags:

Css Example