Search
 
SCRIPT & CODE EXAMPLE
 

SQL

mariadb json select

+----+--------+-------+-------+---------------------------------+
| id | name   | price | stock | attr                            |
+----+--------+-------+-------+---------------------------------+
|  2 | Shirt  | 10.50 |    78 | {"size": 42, "colour": "white"} |
|  3 | Blouse | 17.00 |    15 | {"colour": "white"}             |
+----+--------+-------+-------+---------------------------------+
  
SELECT name FROM clothes WHERE JSON_EXTRACT(attr, '$.size') = 42;
Comment

PREVIOUS NEXT
Code Example
Sql :: mariadb json select 
Sql :: sql change date format 
Sql :: 3rd highest value in sql 
Sql :: SQL ORDER BY ASC (Ascending Order) 
Sql :: test the postgresql db connection 
Sql :: wherein sql 
Sql :: mysql group by date 
Sql :: postgresql subtract date/hours 
Sql :: sql select case when 
Sql :: xampp mysql version 
Sql :: mysql age by birthdate 
Sql :: alter table add check constraint oracle 
Sql :: where with multiple conditions in mongodb 
Sql :: current date in sql 
Sql :: get week day from date in sql 
Sql :: mysql date equals to current_date plus days 
Sql :: query by column for substring sql 
Sql :: select columns postgres 
Sql :: postgresql random phone number 
Sql :: sql database connectivity 
Sql :: update foreign key value in mysql 
Sql :: sql view talbe columns 
Sql :: charindex 
Sql :: how insert auto increment 
Sql :: sql select date add day 
Sql :: mysql add to value 
Sql :: download sql server for mac 
Sql :: change permission to database mysql 
Sql :: how to truncate foreign key constraint table 
Sql :: default value false mysql 
ADD CONTENT
Topic
Content
Source link
Name
1+2 =