oracle11g - I've some 40,000 records in my table and I want to remove the last to digits for all the records in a column -


my data below :

2272522520 2272523235 2272525435 2272525437 2272525439 2272525443 2272525444 2272551733 

i want remove last digit rows in column. can please help. in advance!

if column of number type:

update your_table set your_column = trunc(your_column/10); 

if it's varchar2:

update your_table set your_column = substr(your_column, 1, length(your_column)-1); 

Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -