Need example query using Timestamp

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ganeshkumar08
    New Member
    • Jan 2008
    • 31

    Need example query using Timestamp

    Hi SQL Friends,

    Can any one please can give me query in which Timestamp datatype should be used.

    Thanks in advance
    Ganesh Kumar
  • cbhrook
    New Member
    • Feb 2008
    • 2

    #2
    Originally posted by ganeshkumar08
    Hi SQL Friends,

    Can any one please can give me query in which Timestamp datatype should be used.

    Thanks in advance
    Ganesh Kumar
    The following 2 queries produce the same results (order of year does not matter):
    select * from Drawing_title where dwg_maint_date> '01-02-2008'
    select * from Drawing_title where dwg_maint_date> '2008-01-02'


    You may also reference the time in your query:
    select * from Drawing_title where dwg_maint_date> '2008-01-02 08:00:00' order by dwg_maint_date

    Comment

    • sonia.sardana
      New Member
      • Jul 2006
      • 95

      #3
      Create table student(roll int,name varchar,date_of _adm datetime)

      insert into student values(1,'Sonia ','14/02/2008')

      select * from student

      Comment

      Working...