Page 1 of 1

Getting date and time

PostPosted: Tue May 13, 2008 9:08 pm
by pcdoctor
Hi,

I would like to know as to how could we get the system date and time using a query..??Pls explain..

Also..Consider the below select statement..

Select salary * 1.1 from Emp


while displaying the results of this wat would be the column name of the result..Will it be system defined like Expression1 or somethin els??

Thanks in Advance

Re: Getting date and time

PostPosted: Wed May 14, 2008 8:05 pm
by CICS Guy
pcdoctor wrote:I would like to know as to how could we get the system date and time using a query..??Pls explain..

Have you looked at the manual?
Datetime special registers: The datetime registers are named CURRENT DATE, CURRENT TIME, and CURRENT TIMESTAMP. Datetime special registers are stored in an internal format. When two or more of these registers are implicitly or explicitly specified in a single SQL statement, they represent the same point in time. A datetime special register is implicitly specified when it is used to provide the default value of a datetime column.
pcdoctor also wrote:Also..Consider the below select statement..
Select salary * 1.1 from Emp

while displaying the results of this wat would be the column name of the result..Will it be system defined like Expression1 or somethin els??
Something like Expression1 I'd think......