Welcome to Dream.In.Code
Getting Help is Easy!

Join 132,606 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 906 people online right now. Registration is fast and FREE... Join Now!




sorting and removing data

 
Reply to this topicStart new topic

sorting and removing data, sorting and removing data from table

joyalfernandes
post 15 Jul, 2008 - 08:14 AM
Post #1


New D.I.C Head

*
Joined: 26 Sep, 2006
Posts: 8


My Contributions


hello i would like to know how to remove data from a table, for example i have a table A which has all the email id store in it and there is a table B which also has email id stored in it. table A is the master table which contains 1000+ records, now i want to compare the contains of table B with A and the contains which i present in table should be removed from table A. how do i do this?? can this be done by using view in MYSQL???? if so how??

example


A
abc@yahoo.com
pqr@yahoo.com
qqq@gmail.com
www@yyyy.com
aaa@rediff.com


B
pqr@yahoo.com
www@yyyy.com



final result showld loook like


C
abc@yahoo.com
qqq@gmail.com
aaa@rediff.com
User is offlineProfile CardPM

Go to the top of the page

baavgai
post 15 Jul, 2008 - 08:58 AM
Post #2


Dreaming Coder

Group Icon
Joined: 16 Oct, 2007
Posts: 1,967



Thanked 96 times

Dream Kudos: 475

Expert In: C, C++, Java, C#, ASP.NET, PHP, Perl, Python, Oracle, SQL Server, MySql, HTML, JavaScript, Lua

My Contributions


Use an outer join between A and B and show only the rows where B is null.

Let's see some SQL and I can be more specific.
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/23/08 02:31AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month