Tagged Questions
1
vote
1answer
81 views
Separating tables vs having one table
At the moment I have a table setup that looks somewhat like this:
create table tbl_locationcollections
(
id int(11) PRIMARY KEY IDENTITY, --(Primary Key),
name varchar(100) not null,
...
2
votes
0answers
116 views
Transform XPath map into XML document using relational data
Background
Most modern databases have XML functions that can be used to extract data in an XML format. I want to avoid the task of manually calling XML functions to extract the data.
This problem ...
2
votes
2answers
148 views
How does ORDER BY really work? [duplicate]
I have one question that confusing me.
By logical query processing, the SELECT clause comes before the ORDER BY clause, and in theory, every step in a query creates a virtual table. So, how is it ...
12
votes
3answers
769 views
Why does ANSI SQL define SUM(no rows) as NULL?
The ANSI SQL standard defines (chapter 6.5, set function specification) the following behaviour for aggregate functions on empty result sets:
COUNT(...) = 0
AVG(...) = NULL
MIN(...) = NULL
MAX(...) = ...