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 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 Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm
No new posts how to see when the last read access ... Mike 1304 DB2 1 Tue Sep 12, 2017 7:52 pm
No new posts PC (UTF-8) -> z/OS (EBCDIC) -> ... prino All Other Mainframe Topics 4 Fri Sep 01, 2017 1:47 am
No new posts Adding a userid to SMTP Security table Yolanda Harvey JCL & VSAM 1 Sun Aug 13, 2017 6:16 pm
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 19 Thu Jul 13, 2017 2:11 pm

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