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
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:
- How to Display Products in a table format?Best solution by Stack Overflow
- How to add primary key from multiple table as a foreign key in a table in sql server 2008?Best solution by stackoverflow.com
- How to output XML from a regular SQL query?Best solution by Stack Overflow
- How do I group different rows in a field?Best solution by Stack Overflow
- How to delete videos from a camcorder?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
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.