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

How many cores do I need for sql server 2016?

0 Answers  


What are the all different types of Joins in SQL Server 2000, Anybody can explain each join with definition..Thanks in advance....

9 Answers   DELL, i Tech, Infosys, Siemens, TCS,


What are the different type of replication in sql server?

0 Answers  


how to get max salary with employee number by using one select query and max function ??

3 Answers   Genpact,


How to delete duplicate records from a table?(for suppose in a table we have 1000 Records in that we have 200 duplicate Records , so ,how to findout that duplicate Records , how to delete those Records and arranged into sequence order? one more thing that there is no primary key at all)

5 Answers   Infosys, McAfee,






Explain about local stored procedure?

0 Answers  


How to convert a numeric expression from one data type to another?

0 Answers  


What is database normalization?

7 Answers   Deloitte, Digicel, JPMorgan Chase, Verifone,


write the query for taking database backup in sql

10 Answers   ABC, IBM, Logica CMG, MA,


Explain the truncate command?

0 Answers  


Explain what is the difference between union and union all?

0 Answers  


Can some one please help with a query which will take only max value of a column in a join.

2 Answers  


Categories