I think that this is impossible. Theoretically: select does two kinds of things:
The first can be seen as a horizontal decrease, opposite to the where-where clause, which can be seen as a vertical decrease. On the other hand, a join can increase horizontal dialing when a join can increase vertical dialing.
augmentation diminishing horizontal join/select select vertical union where/inner-join
The second is mapping. Display is more of a converter. In SQL, it takes multiple fields and returns zero or more fields. In the select element, you can use some aggregate functions, such as sum, avg, etc. Or take all the column values โโand convert them to a string. In C # linq, we say that select takes an object of type T and returns an object of type U.
I think the confusion is due to what you can do: select 'howdy' from <table_name> . This function is a display, part of the selection converter. You do not print anything, but convert! In your example:
SELECT " WHERE 1 = 1
you do not convert anything / null to "Hello world" and narrow the set of nothing / no tables to one row, which imho makes no sense.
You may notice that if you do not limit the number of columns, "Hello world" is printed for each available row in the table. I hope you understand why by now. Your selection does not accept any of the available columns and creates a single column with the text: "Hello world" .
So my answer is NO. You cannot simply refuse the from clause because column columns are always required for selection.
Andries Dec 05 '12 at 16:20 2012-12-05 16:20
source share