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 one database have multiple instances?

0 Answers  


What is an inner join, and an outer join ?

1 Answers   CTA,


I have a table which has thousand of records i want to fetch only record num 100 to record num 200. Write a query that satisfies this criteria.(Cant use any keys) Anyone please reply ASAP!

17 Answers   KNIT, Tech Mahindra,


What is cloudant database?

0 Answers  


What is the use of runstats in db2?

0 Answers  






What is REORG? When is it used?

4 Answers  


What is the use of db2 optimizer?

0 Answers  


Shall i use this query to retrieve first 4 records, Select empno, sal from emptbl where empno < 5. like this can we fetch first 100 records?

3 Answers  


Can we use group-by clause in sub-query? If 'yes' means,Will it be executed successfully or else If 'no' means why should we not using that method? Give me your suggestion please....

1 Answers  


What will the DB2 optimizer do?

2 Answers  


What is Skeleton cursor table (SKCT)?

2 Answers  


Is ibm db2 open source?

0 Answers  


Categories