you are provided with the single table having say 4 col ie
fname lname age city , now the all records with displying of
only fname and lname is required but in this format say my
name is abhay khanna it will come like this
abhay-khanna
rahul-roy
gaurav-singh
the above format is required

Answers were Sorted based on User's Feedback



you are provided with the single table having say 4 col ie fname lname age city , now the all recor..

Answer / monal

TRY THIS:
SELECT FIRSTNAME +'-'+LASTNAME FROM 'TABLENAME'

Is This Answer Correct ?    7 Yes 1 No

you are provided with the single table having say 4 col ie fname lname age city , now the all recor..

Answer / sudhakar

use replace function
select replace(a,' ','-') from sub_string

Is This Answer Correct ?    1 Yes 1 No

you are provided with the single table having say 4 col ie fname lname age city , now the all recor..

Answer / radhakrishnan

select replace('radha krishnan',' ','-')

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More SQL Server Interview Questions

What are the different types of queries?

1 Answers  


What is inline variable assignment?

0 Answers  


What is unique key constraint?

0 Answers  


what are cursors? : Sql server database administration

0 Answers  


How many types of triggers are there?

0 Answers  






if 3 duplicate records in a table,i want to delete 2 duplicate records by keeping 1 duplicate and 1 original as it is,how?

5 Answers  


What is plan freezing?

0 Answers  


How to tune a stored procedure?

6 Answers  


What is normalization 1nf 2nf 3nf?

0 Answers  


What does nvl stand for?

0 Answers  


How can you control the amount of free space in your index pages?

0 Answers  


Explain transaction server isolation?

0 Answers  


Categories