Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: SQL
Posted by: Maria Dan
Added: Feb 5, 2021 4:35 PM
Modified: Feb 17, 2021 4:40 PM
Views: 4
Tags: no tags
  1. --select from object
  2. SELECT client,
  3.     data->'title' AS title
  4.     FROM books;
  5.    
  6. --select from array
  7. SELECT data->0
  8. FROM products WHERE data->>0 = 'red';
  9.  
  10. --comment
  11. comment ON COLUMN TABLE_NAME.column_name IS 'comment';