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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:49:50+00:00 2026-06-13T05:49:50+00:00

Hi I have a SQL table as below; ————————– col1 | col2 | col3

  • 0

Hi I have a SQL table as below;

--------------------------
col1 | col2 | col3 | col4|
--------------------------
 10  |  20  | 30   | 40  |
 15  |  22  | 12   | 21  |
 11  |  40  | 50   | 60  |

and I’m trying to delete column specific data from the table. For instance I want to delete 50 and 60 in respective 3rd and 4th columns.

I use the following code but it deletes the entire row which contains 11 and 40 as well. Code is as follows. can some one tell me how to alter my approach below? Thanks.

 $result = mysqli_query($con,"DELETE FROM table1 WHERE col1 ='11'");
  • 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-13T05:49:51+00:00Added an answer on June 13, 2026 at 5:49 am

    You need to update the row, instead of delete, like this,

    $result = mysqli_query($con,"UPDATE table1 SET col3='', col4='' WHERE col1 ='11'");
    

    NOTE: Update is used for changing the value in specific columns, keeping the row intact. Delete is for deleting/removing the entire row, from the table.

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

Sidebar

Related Questions

I have a Money column in my SQL Server 2008 table. In my below
I have a sql table called predictions with data as below Week Player Points
I have data in the SQL 2005 table as below. Table Name: FilterData CategoryID
I have an SQL table defined as below: CREATE TABLE [TestComposite] ( ID int,
I have a table similar to below in sql server 2005 date_column | field1
I have a T-SQL query as below which queries a table holding the search
i have four tables like below in sql server 2008 : TABLE 1 ->
I have a sql table similar to the one below. And I want to
I have a sql table which have the following data, Id City Country ---
I have a sql server query question. I have a table like below. Giving

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.