- 
	
	
		
			
			
				Contributing Member
			
			
			
			
				
					
						  
 
					    
				 
 
			
				
				
				
					SQL query
				
					
						
							Hi all,
 
 I am beginner to SQL.
 Please can anyone provide me the query which returns rows with same value.
 For ex:
 I have 2 table emp and address.
 
 emp table has employee name and employee id
 Address table has empid and address..
 
 Address may be same for more than one employee..
 
 I need those employees whose address are same??
 
 thanks in advance
 with regards
 Prakash
 
 
 
 
 
 
 
 
 
- 
	
	
		
			
			
				Junior Member
			
			
			
			
				
					
						  
 
					    
				 
 
			
				
				
				
					Re: SQL query
				
					
						
							What parameters do you look at to determine if a query is performing properly
 
 
 
 
 
 
 
 
 
- 
	
	
		
			
			
				Contributing Member
			
			
			
			
				
					
						  
 
					    
				 
 
			
				
				
				
					Re: SQL query
				
					
						
							Emp name,emp id and address of all who have same address
 
 thanks
 
 
 
 
 
 
 
 
 
- 
	
	
		
			
			
				Contributing Member
			
			
			
			
				
					
						  
 
					    
				 
 
			
				
				
				
					Re: SQL query
				
					
						
							hi
 The below query will help for u
 
 select x.* from (select a.employee_id,a.employee_name,b.address, from emp a,address b where a.employee_id=b.employee_id) x
 where x.address in(select distinct address from address)
 
 
 
 
 
 
 
 
 
- 
	
	
		
			
			
				Junior Member
			
			
			
			
				
					
						  
 
					    
				 
 
			
				
				
				
					Re: SQL query
				
					
						
							are you asking for a minimum of two employees having the same address?
 
 
 
 
 
 
 
 
 
 
	
	
	
	
	
	
	
	
	
	
	
	
		
		
			
				 Posting Permissions
				Posting Permissions
			
			
				
	
		- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-  
Forum Rules