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

Why do we use cursor?

599


What is the difference between nvl and coalesce?

604


What is view db2?

626


What is reorg?

619


How can the firstname and the lastname from the emp table be concatenated to generate complete names?

748






How to get the ddl of a table in db2?

679


What is buffer pool?

613


What is concurrency?

711


What is a cursor in programming?

596


Mention the definition of cobol in varchar field.

700


What is the advantage in De-normalizing tables in DB2?

748


List some fields from sqlca?

613


What is host variable in db2 cobol?

604


Is it possible to alter a table – for example adding a column, when another user is accessing or updating some columns?

630


before altering a table is it necessary to lock ? if lock what is it ? how to do ? ifi want to lock a table what is that command ?

1715