Click here to Skip to main content
15,902,198 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a tbl_album table.
The columns names are id, album_name and image_name.
I want to select all albums with one image name.
Posted
Updated 31-Dec-10 1:36am
v2
Comments
mohammadrijwan 31-Dec-10 7:46am    
brother describe ur Qtn..

here i think, means that u want that there a lot of data in album_name column with image name..
means that image name is this then disaply all album that belong to this image thats right..
if this then
u can

select album_name where image_name='this'


ok bro..

SQL
select distinct album_name where image_name LIKE '%what you want to compare%'


Is it ? :confused:
 
Share this answer
 
v2
Hello,

what about this one:

select album_name 
from tbl_album 
group by album_name 
having count(image_name ) = 1


Valery.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900