Please explain what is meant by tuples in sql?Thanks..
It's a shortened "N-tuple
" (like in quadruple
, quintuple
etc.)
It's a row of a rowset taken as a whole.
If you issue:
SELECT col1, col2
FROM mytable
, whole result will be a ROWSET
, and each pair of col1, col2
will be a tuple
.
Some databases can work with a tuple as a whole.
Like, you can do this:
SELECT col1, col2
FROM mytable
WHERE (col1, col2) =
(
SELECT col3, col4
FROM othertable
)
, which checks that a whole tuple
from one rowset
matches a whole tuple
from another rowset
.