Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
array comparison
--PostgreSQL 9.6 --'\\' is a delimiter select '{1,2,3}'::int[] = '{3,2,1}'::int[], --false '{1,2,3}'::int[] && '{3,2,1}'::int[], --true, but see next example '{1,2,3}'::int[] && '{3,2,1, 4}'::int[], -- as you see that additional element did not make the result false, '{1,2,3}'::int[] && '{3,2,1, 4}'::int[] and array_length('{1,2,3}'::int[], 1) = array_length('{3,2,1, 4}'::int[], 1), -- as you see that additional element did not make the result false, '{1,2,3}'::int[] && '{3,2,1, 4}'::int[] and array_length('{1,2,3}'::int[], 1) = array_length('{3,2,1}'::int[], 1) -- valid comparison
run
|
edit
|
history
|
help
0
SQL - Unpivot Table
prec
PostgreSQL Sandbox: General Resale
Studco
SQL social network practice by Han Wang 20200720 - 2
1225. Report Contiguous Dates
Tic tac toe
mandelbrot set
PostreSQL: Today's Date/Time
Many to many