Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. how can I make the value of an attribute in a table as SYSDATE

how can I make the value of an attribute in a table as SYSDATE

Scheduled Pinned Locked Moved Database
questiontutorial
4 Posts 4 Posters 6 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    alexyxj
    wrote on last edited by
    #1

    currently I have a table need some data populated into it, one attribute requires to show SYSDATE, can any one tell me how to insert a SYSDATE value into the table? or can I set the value of this attribute the time I create the table?? many thanks....

    C A W 3 Replies Last reply
    0
    • A alexyxj

      currently I have a table need some data populated into it, one attribute requires to show SYSDATE, can any one tell me how to insert a SYSDATE value into the table? or can I set the value of this attribute the time I create the table?? many thanks....

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      SYSDATE? What database technology are you talking about?

      Recent blog posts: *Method hiding Vs. overriding *Microsoft Surface *SQL Server / Visual Studio install order My Blog

      1 Reply Last reply
      0
      • A alexyxj

        currently I have a table need some data populated into it, one attribute requires to show SYSDATE, can any one tell me how to insert a SYSDATE value into the table? or can I set the value of this attribute the time I create the table?? many thanks....

        A Offline
        A Offline
        Al Ortega
        wrote on last edited by
        #3

        http://www.techonthenet.com/oracle/triggers/before_insert.php[^]

        hth Al

        1 Reply Last reply
        0
        • A alexyxj

          currently I have a table need some data populated into it, one attribute requires to show SYSDATE, can any one tell me how to insert a SYSDATE value into the table? or can I set the value of this attribute the time I create the table?? many thanks....

          W Offline
          W Offline
          Wendelius
          wrote on last edited by
          #4

          You can use SYSDATE as a value so in INSERT statement you can say:

          INSERT INTO TableName (Column1, Column2,...) VALUES (Value1, SYSDATE,...)

          If you want to make SYSDATE a default value for a column, you can use DEFAULT constraint for the column. Also you can set the default value in trigger using PL/SQL.

          The need to optimize rises from a bad design

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups