FlipKart Offer

Translate to Tamil

Amazon Best Offer

AliExpress Offers

Online Income

Thursday, 21 April 2011

SQL Getdate()

The GetDate() function returns the current system date and time.

Syntax 


  SELECT GetDate() FROM table_name

Notes : Sql Server only Getdate() function used Other Some Database Used now()

The "Custmast" table


custcode
custname
city
qty
rate
1
Siva
Srivilliputtur
50
70
2
Bala
Sivakasi
30
56
3
Kanna
Madurai
100
200
4
Vijay
Chennai
30
30
5
Kodee
Sandnes
60
80
5
Kodee
Srivilliputtur
60
30

Example :

Select custname,Getdate() as Date from Custmast

custname
Date
Siva
2011-12-05 19:31:29.390
Bala
2011-12-05 19:31:29.390
Kanna
2011-12-05 19:31:29.390
Vijay
2011-12-05 19:31:29.390
Kodee
2011-12-05 19:31:29.390
Kodee
2011-12-05 19:31:29.390

 Share This Post


Smilely

Services

© 2014