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 a plan and package in db2?

0 Answers  


ther r 2 tables OTTABLE & SALTABLE, add the otamt from OTTABLE to empsal of SALTABLE if eid is matched else add the unmatched from OTTABLE to SALTABLE

0 Answers  


What is a buffer pool?

2 Answers  


Cursors can be declared in both working-storage & procedure division, agreed. But is there any difference? If could you please suggest what is the difference

0 Answers  


How do u achieve record level locking in DB2 versions when record level locking is not allowed?

2 Answers   IBM,






Explain the function of data manager.

0 Answers  


Can SQL statements/queries be included in a copybook?

2 Answers  


How can we read records for specific member in CL? AND rpg?

0 Answers  


Which DB2 catalog tables are used to produce a list of table column by table for all tables in a database?

1 Answers  


Compare a subselect to a join?

1 Answers  


What is universal database?

0 Answers  


What are the uses of db2 optimizer?

0 Answers  


Categories