-
Hi,
I have a index on a 'number' column. As this column has very large values, it shows in exponentials when I make a select statement(shows a 5.173E+10 for a value
5173059437517)
Now I want to delete this particular record .so when I say
delete from table
where col_name = 5173059437517, it deletes 0 recors.
if i say
delete from table
where to_char(col_name) = to_char(5173059437517),
it's not making use of index.
1) So How do I delete this record.
2) If i convert the datatype of a indexed column for quering, will it still use the indexes.
Badrinath
-
If You use any Function on any Column the Index use is Eliminated unless you have Function-Based Index.
Two ways, get the Exact Number and the Rowid for that,
Set Numwidth 25
Then select this record with Rowid... Then Issue Delete from ..
Where Id= This is
Or You can use the Where Rowid = The Rowid..
Should be Fine,
Thanks
-
Hi,
Every row in Oracle has a rowid associated with it.U can query the rowid of the row and then use the delete statement to delete that particular row.Any questions contact me at rohitsn@altavista.com
Regards,
Rohit Nirkhe
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|