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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T19:40:40+00:00 2026-06-12T19:40:40+00:00

I have two tables threads table _id recipient_id type 1 1 2 1 3

  • 0

I have two tables

threads table

_id   recipient_id    type
 1     1
 2     1
 3     2

and addresses table

_id    address
1      HELLO
2      BYE 

recipient_id is mapped to addresses table’s _id

I need to update type to a specific value if address is HELLO. How do i do it? I have already tried

UPDATE   threads SET threads.type = 106 FROM threads  
   INNER JOIN 
   addresses  ON addresses._id = threads.recipient_ids
    AND
   addresses.address LIKE '%HELLO%';

But i am getting an error near ".": syntax error .
What is the correct syntax to update a column?

  • 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-12T19:40:41+00:00Added an answer on June 12, 2026 at 7:40 pm

    You can use the IN operator:

    sqlite> .dump
    PRAGMA foreign_keys=OFF;
    BEGIN TRANSACTION;
    CREATE TABLE threads (_id integer primary key, recipient_id integer, type text);
    INSERT INTO "threads" VALUES(1,1,NULL);
    INSERT INTO "threads" VALUES(2,1,NULL);
    INSERT INTO "threads" VALUES(3,2,NULL);
    CREATE TABLE addresses (_id integer primary key, address text);
    INSERT INTO "addresses" VALUES(1,'HELLO');
    INSERT INTO "addresses" VALUES(2,'BYE');
    COMMIT;
    sqlite> update threads set type = 106 where _id in
       ...> (select t._id from threads t, addresses  a
       ...>  where t.recipient_id = a._id and a.address like '%HELLO%');
    sqlite> .dump
    PRAGMA foreign_keys=OFF;
    BEGIN TRANSACTION;
    CREATE TABLE threads (_id integer primary key, recipient_id integer, type text);
    INSERT INTO "threads" VALUES(1,1,'106');
    INSERT INTO "threads" VALUES(2,1,'106');
    INSERT INTO "threads" VALUES(3,2,NULL);
    CREATE TABLE addresses (_id integer primary key, address text);
    INSERT INTO "addresses" VALUES(1,'HELLO');
    INSERT INTO "addresses" VALUES(2,'BYE');
    COMMIT;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two tables, one is a table of forum threads. It has a
I have two tables linked together through the 3rd table threads: id, name tags:
I have two tables: table a ida valuea 1 a 2 b 3 c
I have two tables one with ID and NAME table 1 ID | NAME
I have two tables user table user_id | name | 1 | peter |
I have two tables, a user table and a application table: User id username
I am building a forum and I have two tables: Threads ------- ThreadID UsersID
I have two tables. One that keeps all of my threads started on a
I have got two tables: threads: id, title posts: id, thread_id, body I want
I have two tables. threads with the columns ID, forumID, title, content, unixtime comments

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.