GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  Database  >  SQL
Go To First  |  Previous Question  |  Next Question 
 SQL  |  Question 137 of 138    Print  
Single Row Function
Display details of employees having same char at the star and end postition of their name

like

abishika

this name have last character and first character is same



  
Total Answers and Comments: 5 Last Update: September 25, 2008     Asked by: sunil_bisht 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: shini Gupta
 
select  * from tbl_users where username like 'char%' and username like '%char'

Above answer was rated as good by the following members:
TECHFAZ, Mamta11, HussainExpect
August 06, 2008 06:55:27   #1  
mv_sivavardhan Member Since: August 2008   Contribution: 6    

RE: Single Row Function

select * from tbl_users with(nolock)

where right(username,1)=left(username,1)


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
August 07, 2008 03:03:19   #2  
msrao226 Member Since: August 2008   Contribution: 1    

RE: Single Row Function
 

select * from tbl_users with(nolock)

where substr(username,1,1)=substr(username,-1,1)


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
August 21, 2008 14:28:48   #3  
shini Gupta Member Since: August 2008   Contribution: 1    

RE: Single Row Function
select  * from tbl_users where username like 'char%' and username like '%char'
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 1Overall Rating: -N/A-    
September 05, 2008 20:52:11   #4  
amitarudra Member Since: September 2008   Contribution: 2    

RE: Single Row Function
Select emp_name from employees where emp_name like 'a%a';
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 1Overall Rating: -N/A-    
September 25, 2008 06:26:25   #5  
me.ranjeet Member Since: September 2008   Contribution: 3    

RE: Single Row Function
Select * FROM TEST WHERE SUBSTR(NAME,1,1)=SUBSTR(NAME,-1,1)
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    


 
Go To Top


 Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape