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 7960417
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:44:55+00:00 2026-06-04T04:44:55+00:00

This question reflects my issue. How to do this in SQLite? I’ve tried UPDATE

  • 0

This question reflects my issue. How to do this in SQLite?

I’ve tried UPDATE with self-joins, isolating the self join in sub-query, triggers, and something similar to this. Here is an example:

UPDATE stage 
SET title = 
(
  SELECT 
    prior.title
  FROM 
    stage prior,
    stage now
  WHERE 
    prior.rownum+1 = now.rownum
)
WHERE
title is null
  • 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-04T04:44:56+00:00Added an answer on June 4, 2026 at 4:44 am

    Every table in SQLite has got a pseudo-column called rowid (which can be accessible under several different names: rowid, oid, _rowid_, unless those names are assigned to other, real, columns). The rowid column is essentially a unique row identifier and you can use it as a sort criterion and/or in conditions.

    The following query demonstrates how your problem can be solved with the help of rowid:

    UPDATE stage
    SET title = (
      SELECT title
      FROM stage AS prev
      WHERE title IS NOT NULL AND prev.rowid < stage.rowid
      ORDER BY prev.rowid DESC
      LIMIT 1
    )
    WHERE title IS NULL
    

    Here’s a demo on SQL Fiddle.

    You can read more about rowid in this SQLite manual.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This question is about programming small microcontrollers without an OS. In particular, I'm interested
This question seems to be the essence of several others on this forum. I
This question already has an answer here: What are Extension Methods? 5 answers Usage
This question might be naive as I'm new to ColdFusion programming. I have a
This question is similar to this one How do I add options to a
This question is related to my problem in understanding rebase, branch and merge ,
This question is related with one of my earlier questions.. Previous Post In there
This question relates to this question which I asked earlier this week. The answer
This question has been asked in a C++ context but I'm curious about Java.
This question kind of starts where this question ends up. MATLAB has a powerful

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.