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

  • Home
  • SEARCH
  • 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 just to clear some things up. Some things like this have
(This question is a follow up from Safari Scrollbars & SVG - the workaround
This question is about tidying up code and better management of said code butI'm
This question is so basic, I'm certain in must be a duplicate of something
This question has been asked many times before, but they all seem to relate
This question has been asked before but the accepted solution (given by the question
This question relates to a prior question which was answered for all practical purposes
This question started out with someone wanting to import every apparent 'line of text'
This question could asked somewhere before but I could not find it, anyways. So
This goes back to my other question which I thought was sufficiently answers but

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.