I have come across VIEWs given as :
SELECT Name, 'Non-existent-field-with-quotes' AS Something FROM myTable;
But I donot understand why would I need that "Something" when it is not present at all?
For example: this is a sample VIEW
SELECT myID, myName, myCity, myState, 'a' as a, 'b' as b
FROM myTable;
What would I do with a and b when there is no field of that type in myTable.
and this VIEW is called as:
SELECT <above_View> WHERE a='something' AND b='something';
Can somebody clarify that please...
Thanx
SELECT Name, 'Non-existent-field-with-quotes' AS Something FROM myTable;
But I donot understand why would I need that "Something" when it is not present at all?
For example: this is a sample VIEW
SELECT myID, myName, myCity, myState, 'a' as a, 'b' as b
FROM myTable;
What would I do with a and b when there is no field of that type in myTable.
and this VIEW is called as:
SELECT <above_View> WHERE a='something' AND b='something';
Can somebody clarify that please...
Thanx