Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How will i insert timpstamp into a table

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
pankajupadhyay
Warnings : 1

New User


Joined: 04 May 2007
Posts: 13
Location: pune

PostPosted: Fri Aug 10, 2007 3:33 pm    Post subject: How will i insert timpstamp into a table
Reply with quote

question1>>>>>i have a table . Table1


col1 col2 timestamp
a v
d b
b n
c p

the timestamp column is empty how will i insert timpstamp in that write query.........

que 2>>> day,time,date,timestamp takes howmach bytes and HOW



Que 3>>>> view is updatable or not.
Back to top
View user's profile Send private message

raviprasath_kp
Warnings : 1

New User


Joined: 20 Feb 2005
Posts: 65
Location: chennai

PostPosted: Wed Aug 22, 2007 2:15 pm    Post subject: Reply to: How will i insert timpstamp into a table
Reply with quote

hi ur going to alter the table or u want to insert the fields

if u want to update the fileld use below qurey

UPDATE table a timestamp = ' '
WHERE id = 'OSISIN';
Back to top
View user's profile Send private message
pankajupadhyay
Warnings : 1

New User


Joined: 04 May 2007
Posts: 13
Location: pune

PostPosted: Wed Aug 22, 2007 3:03 pm    Post subject: Reply to: How will i insert timpstamp into a table
Reply with quote

Hi,
Thanks for reply. I want to insert current time stamp.
Back to top
View user's profile Send private message
somnath

New User


Joined: 21 Mar 2005
Posts: 18
Location: India

PostPosted: Wed Aug 22, 2007 3:06 pm    Post subject: Reply to: How will i insert timpstamp into a table
Reply with quote

There is a keyword CURRENT TIMESTAMP.
U can use that to insert the current timestamp into that field.
U'r query will be somewhat like below:

Insert into table_name
(colA,colB,timestamp)
values
('X','Y',CURRENT TIMESTAMP)
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm
No new posts Insert Lines in JCL with Rexx after a... Willy Jensen CLIST & REXX 3 Tue Aug 30, 2016 4:18 pm
No new posts How to insert a lengthy string havin... vidyaa DB2 7 Thu Aug 25, 2016 5:20 pm
No new posts Command UNIQUE CONSTRAINT on any tabl... rohanthengal DB2 2 Thu Aug 18, 2016 3:48 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us