Search
 
SCRIPT & CODE EXAMPLE
 

SQL

oracle select json_table example

-- EXAMPLE TABLE STRUCTURE:
CREATE TABLE LDAP_USERS.API_LOG
(
  DATETIME  	DATE,
  JSONCOLUMN    CLOB
)

-- JSON STRUCTURE:
{ keyname1: value1, keyname2: value2, ... }

-- SELECT EXAMPLE
SELECT a.*, j.*
  FROM YOURSCHEMA.yourtable a, 
  JSON_TABLE ( a.JSONCOLUMN,
               '$'  COLUMNS(
                     keyname1 VARCHAR(10) PATH '$.keyname1',
                     keyname2 VARCHAR(10) PATH '$.keyname2'
                     )
            ) as j
            
Comment

PREVIOUS NEXT
Code Example
Sql :: mysql workbench tutorial 
Sql :: postgresql regex extract a word from string 
Sql :: replace tab in sql 
Sql :: restart mysql 
Sql :: alter column to not null with default value sql server 
Sql :: postgresql backup and restore globals and data 
Sql :: truncate table sqlite 
Sql :: database get 10 user aleatory 
Sql :: oracle inner join 
Sql :: sql rename column in select query 
Sql :: difference between normalization and denormalization 
Sql :: rand mysql 
Sql :: oracle pl/sql package 
Sql :: create table with float datatype in sql server 
Sql :: sql server: how to concatenate column data using comma 
Sql :: sql is null 
Sql :: php5-mysql has no installation candidate 
Sql :: oracle get foreign keys on table 
Sql :: sql like case sensitive 
Sql :: alter table query in mysql 
Sql :: mysql size of database 
Sql :: declare date variable sql 
Sql :: create postgres table 
Sql :: 2 max value in sql 
Sql :: insert or update sql query 
Sql :: sql server inner join convert collation 
Sql :: php mysql select current month 
Sql :: procedure syntax 
Sql :: reset counter postgres 
Sql :: npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! sqlite3@4.2.0 install: `node-pre-gyp install --fallback-to-build` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the sqlite3@4.2.0 install script. 
ADD CONTENT
Topic
Content
Source link
Name
1+9 =