How do you retrieve the first 5 characters of firstname column of db2 table emp?



How do you retrieve the first 5 characters of firstname column of db2 table emp?..

Answer / ankit

Select substr(firstname,1,5) as firtname from emp;

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More DB2 Interview Questions

Can DASD types assigned to storage groups be intermixed (i.e., 3350s and 3380s)?

1 Answers  


How to resolve -818 sql code in DB2?

2 Answers   Cap Gemini,


When DB2 connection fails, will online program work or give errors.

1 Answers   Virtusa,


What techniques are used to retrieve data from more than one table in a single SQL statement?

2 Answers  


What do you mean by commit and rollback?

0 Answers  






Can you use a select query in a loop to fetch multiple rows? If so what is the advantage of using a cursor?

2 Answers   L&T, UST,


What happens to a cursor after a commit?

3 Answers  


Explain in brief how does db2 determine what lock-size to use?

0 Answers  


What is lock escalation?

2 Answers  


how to fetch first 100 rows in db2

2 Answers   IBM,


in my table i will update only 100 record among 1000 records i need to display recently updated record'.....can u tell me where those records are stored how can i display those records...?if there is any sql query pls let me know....?

3 Answers   Infosys,


How to define the data items to receive the fetch items for the SQL?

2 Answers  


Categories