in column y record
abc.v
abc.s
xyz.j
abc.h
i wan only abc columns
how to retrieve thi records

Answers were Sorted based on User's Feedback



in column y record abc.v abc.s xyz.j abc.h i wan only a..

Answer / madhu t

select Y from <table> where substr(y,1,3) = 'abc'

we can achieve this by using substring function in sql.
SUBSTR(column-name,starting-position,length)

Is This Answer Correct ?    12 Yes 0 No

in column y record abc.v abc.s xyz.j abc.h i wan only a..

Answer / ekalavya

SELECT Y
FROM TABLEA
WHERE Y LIKE 'abc%';

Is This Answer Correct ?    7 Yes 0 No

Post New Answer

More DB2 Interview Questions

what is the syntax for FOR UPDATE CLAUSE in cursor declaration and how can u update using cursor? is it possible to update multiple rows at a time.

2 Answers   Syntel,


Where is the access path logic created by the DB2 Optimizer stored?

1 Answers  


Do we have any optinon to search part of integer in DB2 as we have for character Like,SUBSTR optins?

1 Answers  


How does a cursor work?

0 Answers  


How will you delete duplicate records from a table?

7 Answers   Google,






On the create tablespace, what does the CLOSE parameter do?

1 Answers  


What is db2 isolation?

2 Answers  


How is deadlock resolved?

0 Answers  


What are the contents of a DCLGEN?

4 Answers   MetLife,


How do you simulate the EXPLAIN of an embedded SQL statement in SPUFI/QMF? Give an example with a host variable in WHERE clause)

2 Answers  


what is the use of bind parameter, Replace?

5 Answers   IBM,


what is the process of precompiler?

2 Answers  


Categories