Search
 
SCRIPT & CODE EXAMPLE
 

SQL

postgresql make each element in array distinct

SELECT ARRAY(SELECT DISTINCT unnest(t_column)) FROM t_name;
Comment

array aggre distinct postgres

SELECT ARRAY(SELECT DISTINCT e FROM unnest(ARRAY[a,b,c,d]) AS a(e))
FROM ( VALUES
  ('foo', 'bar', 'foo', 'baz' )
) AS t(a,b,c,d);
Comment

PREVIOUS NEXT
Code Example
Sql :: trigger sql 
Sql :: Caused by: java.lang.RuntimeException: Unable to obtain credentials to communicate with the Cloud SQL API 
Sql :: sql trying to delete database in use 
Sql :: find all tables where column name exists oracle 
Sql :: php mysql select current month 
Sql :: time in sql server 
Sql :: oracle list user locked 
Sql :: intersect sql 
Sql :: show database not empty tables postgres 
Sql :: python sqlalchemy orm to select null values 
Sql :: desinstaller mysql sur ubuntu definitivement 
Sql :: mssql coalesce 
Sql :: mysql order by rand limit 1 really slow 
Sql :: mysql get table column names and data types 
Sql :: set a value by excuting stored procedure 
Sql :: rename temp table column name in sql server 
Sql :: How to create a comulative Sum column in mysql 
Sql :: sql update by id 
Sql :: compound trigger oracle 
Sql :: take sql dump in to file 
Sql :: update sql 
Sql :: mariadb cast null to 0 
Sql :: insert into from 
Sql :: Ms Sql set us timezone 
Sql :: default username and password for oracle 11g 
Sql :: what is table in sql 
Sql :: SQL SMALLDATETIME Data Type 
Sql :: add column sql 
Sql :: sorting desc in sql 
Sql :: SQL MIN() Function 
ADD CONTENT
Topic
Content
Source link
Name
3+1 =