I learn SQL from this: http://www.w3schools.com/sql/sql_select.asp
SELECT LastName,FirstName FROM Persons
this show me:
LastName | FirstName
Hanse | Ola
Svendson | Tove
Pettersen | Kari
how can i add for this own columns without get data from DATABASE?
for example:
SELECT TEST(default: aaa), LastName,FirstName FROM Persons
this should show me:
TEST | LastName | FirstName
aaa | Hanse | Ola
aaa | Svendson | Tove
aaa | Pettersen | Kari
If you want to create a “default” value on an actual field in a table you could use either the Coalesce or IsNull functions (please assume that Test is an actual field):
Both of these will return either the actual value of the field Test or ‘aaa’ if Test is Null.
We use COALESCE when retrieving the next Primary Key from a table (we don’t use the Identity Property to maintain our PK’s)
This way if there if the table doesn’t contain any rows then 1 will be returned.