In my table having 100 Rec. How can I delete the 7th row??
(we don't know what is data inside the table)
Answer Posted / harsha
Use DELETE FROM TabName
The above command will delete all rows of the table with
out deleting the table.
Now if we want to delete 7th row and we don't know the
actual data in that row, then in that case we need to
create a new temporary result table, that contains only one
desired record which you want to delete.
Here are the steps.
1 Select only 7 row data.
2 Sort it in descending order(ORDER BY calue)
3 Select only first row
4 Now you have a result table with only 1 and desired record
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
What are the rules for db2 programming?
What is the difference between dbm cfg and db cfg file in db2 ?
How to execute stored procedure in db2 command editor?
What is the syntax for creating a table in the db2 database?
i tried to copy some records from microsoft excel to as-400 physical file through "Bosanova" emulation. Out of 14000 records only 12000 records copies and subsequently programe started to hang. Then, i closed the program forcefully. I did' under stand the problem. Also when i try to compile the physical file it is showing as "The file in use". How to overcome this problem?
Are views updateable?
What is ibm db2 connect?
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 ?
What is meant by union and union all?
What is scrollable cursor in db2?
What is ibm db2 client?
Explain db2.
What do you mean by commit and rollback?
How do I import data from excel to db2?
Is the primary key a clustered index?