how can I make the value of an attribute in a table as SYSDATE
-
-
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....
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
-
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....
-
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....
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