List:General Discussion« Previous MessageNext Message »
From:Curtis Maurand Date:May 16 2003 3:59am
Subject:RE: a database design question....
View as plain text  
select table1.books from table1, table2 where table1.books != table2.books

Curtis

On Tue, 13 May 2003, Bruce Douglas wrote:

> Bruce...
> 
> Thanks for the response.. Someone else had suggested the same thing!! it
> solved the issue... however, i have another quick question that i thought i
> had solved... i have two tables. both have a field "books"
> 
> table1
> 	name
> 	books
> 
> table2
> 	dogs
> 	books
> 
> i'm trying to come up with a quick query that will let me get all the rows
> in table1 that don't have books matching in table2
> 
> in other words... table1 books (sam, foo, duck, shoe)
> 			table2 books (sam, foo)
> 
> my query would return (duck, shoe)
> 
> i thought i had it.. but testing proved me wrong...
> 
> select openassettbl.assetid, assetname, description from openassettbl,
> 				selectiontbl where
> 				openassettbl.assetid != selectiontbl.assetid
> 
> this seems to have given me everything!!!
> 
> 
> thanks
> 
> bruce
> bedouglas@stripped
> 
> 
> -----Original Message-----
> From: Bruce Feist [mailto:bfeist@stripped]
> Sent: Tuesday, May 13, 2003 3:16 PM
> To: Bruce Douglas; mysql@stripped
> Subject: Re: a database design question....
> 
> 
> Bruce Douglas wrote:
> 
> >table foo
> >	uid
> >	store
> >	asset
> >
> >	uid	store	asset
> >	3	tom	book
> >	3	tom	table
> >	etc....
> >
> >so i can have duplicates in any of the columns.... i just can't have a row
> >where all of the columns are already in the table.
> >
> Create a single unique index (or primary key) on all three fields.
> 
> Bruce Feist
> 
> 
> 
> 
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/mysql?unsub=1
> 
> 
> 

-- 
--
Curtis Maurand
mailto:curtis@stripped
http://www.maurand.com


Thread
Select in selectBogdan Soos7 May
  • LoggingJerry7 May
  • Re: Select in select(Terry Riley)7 May
  • re: Select in selectEgor Egorov7 May
re: Select in selectRichard Morton8 May
  • Password Encryption...Doug Coning8 May
    • Re: Password Encryption...Jeff Shapiro8 May
      • Re: Password Encryption...Curtis Maurand12 May
        • a database design question....Bruce Douglas13 May
          • Re: a database design question....Becoming Digital15 May
  • Re: Password Encryption...Michael T. Babcock9 May
RE: a database design question....Bruce Douglas13 May
  • Re: a database design question....Bruce Feist14 May
    • RE: a database design question....Bruce Douglas14 May
      • Re: a database design question....Bruce Feist14 May
      • RE: a database design question....Curtis Maurand16 May
        • Re: a database design question....Bruce Feist16 May
        • Re: a database design question....Martin Gainty16 May
  • RE: a database design question....Curtis Maurand14 May
    • Re: a database design question....Michael Brunson14 May
    • questionRandy Paries14 May
  • RE: a database design question....Jennifer Goodie14 May
RE: a database design question....Bruce Douglas14 May