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 unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm
No new posts Join of more than one table dibyendumandal11111 DB2 6 Mon Feb 13, 2017 11:36 pm
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am


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