How to Compare Rows in SQL?

How to delete rows from a table in sql?

  • hei guys i have altered the table to add a column and started inserting values into the column without giving any condition then it took the values into new rows as i didn't gave any condition then i realized and dropped that column now the problem is when i retrieved the table it is showing the extra rows without any values i mean actually the Table has only 13 rows but it is showing 17 rows .from 13 to 17 it has nothing i wanna delete those rows please help me thank you

  • Answer:

    DELETE FROM YourTable WHERE YourColumn IS NULL;

venki at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

To remove Null rows do this DELETE FROM tablename WHERE id =NULL; I think this may help.

TRUNCATE TABLE tablename; that should do it. (actually this will remove all rows)

learn this free ebook : http://hugebook.net/?p=248

DELETE FROM `table_name` WHERE `id` = <id of row you want to delete> LIMIT 1;

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.