i have a table student like
sname
-----
ram
ram
ram
raj
raj
raj
i need the output like
sname
-----
ram
raj
ram
raj
ram
raj

Answer Posted / mala

select a.tnam,b.tnam from (select tnam from temp where tnam
= 'Ram' ) a,
(select tnam from temp where tnam = 'Raj' ) b

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a with(nolock)?

580


What are the encryption mechanisms in sql server?

578


How to configure and test odbc dsn settings?

577


How do I install sql server?

470


What is sql injection and why is it a problem? : sql server security

573






What are the restraints imposed on the table design by a merge replication?

570


Explain optimistic and pessimistic concurrency?

544


Explain atomicity?

579


How to find out the list schema name and table name for the database?

530


Which data type columns are the best candidates for full-text indexing?

604


How to update a field in SQL after ALTERING a row?

690


How to Insert multiple rows with a single insert statement?

549


What is analysis service repository?

589


Explain the difference between delete,drop and truncate in SQL Server?

592


What do you mean by subquery?

587