Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8369545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:40:32+00:00 2026-06-09T13:40:32+00:00

Database version:oracle 11gr2, my table is like: create table t_test(t_id number,t_value number) insert into

  • 0

Database version:oracle 11gr2,
my table is like:

create table t_test(t_id    number,t_value number)
insert into t_test (t_id) values (1);
insert into t_test (t_id) values (2);
insert into t_test (t_id) values (6);
insert into t_test (t_id) values (10);
insert into t_test (t_id) values (3);

t_id  t_value
 1      null
 2      null
 6      null
 10     null
 3      null

My expecting update is like:

select t.t_id,row_number() over (order by t.t_id) 
from t_test t

t_id  row_number() over (order by t.t_id) 
 1      1
 2      2
 6      4
 10     5
 3      3

But analytic function is not allowed in update view:

update
(select t.value,row_number() over (order by t.t_id) rn
from t_test t)
set value=rn

Without no doubt,it causes ORA-01732.
How do I put my update query?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T13:40:34+00:00Added an answer on June 9, 2026 at 1:40 pm

    Try this

    update  t_test 
    set t_value = ( select rn  
                       from ( select i.t_id, row_number()  over (order by i.t_id) rn  
                              from t_test i) tab 
                        where tab.t_id= t_test.t_id  )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to insert a data into oracle database(version 11g xe).But when i'm trying
I have like 400 records on my database, suppose this is the first version
I'm trying to connect my application with an Oracle database using NHIBERNATE 3.1.0.4000 version
I've got a new database here and it's an upgraded version from Oracle 10g
I want to use an Oracle database with c#. Please suggest an Oracle version
Is it possible to insert the € (as a VARCHAR) in a Oracle Database
The Oracle version of our database is 10g. The stored procedure selects all the
I am using attempting to create a connection to an Oracle database via entity
I want to migrate database server from Oracle 9i to Oracle 11g (WebLogic version
We have customers who are upgrading from one database version to another (Oracle 9i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.