How can you split a table in to exactly half?

Answer Posted / kumar

Hi ............
try this one ....might be a logical one ... but have to
give customers what they want.....

Select count(*) into :ws-count from emp with ur;

Declare CURSOR cursor1 for
Select *(if possible better code all fields)
from emp where count(*) < :ws-count;
Open cursor
Fetch cursor.

Declare CURSOR cursor2 for
Select *(if possible better code all fields)
from emp where

count(*) >= :ws-
count;
Open cursor
Fetch cursor.

Is This Answer Correct ?    0 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is innodb buffer pool?

560


How does cobol compile db2 program?

606


Mention the downsides of page level lock.

703


What are the contents of dclgen?

652


What is cursor stability in db2?

805






Outputs of explain are with matchcols = 0. What does this signify?

615


List down the types of triggers in the db2 database?

586


How is a typical db2 batch pgm executed?

638


What is database alias db2?

598


What is the purpose of rollback and commit?

589


What is page size in db2?

559


Why do chiropractors use drop table?

656


What is copy pending and check pending in db2?

570


What is the maximum size of varchar data type in db2?

643


Why do we use cursor?

595