If suppose in a table ship(name,year),find ship name having
first and last name(i.e having space in between)
ex: SAINT LOUIS,JET LAKE.

Answers were Sorted based on User's Feedback



If suppose in a table ship(name,year),find ship name having first and last name(i.e having space i..

Answer / challa yerriswamy

select name,year
from ship
where name like '% %';

Is This Answer Correct ?    10 Yes 1 No

If suppose in a table ship(name,year),find ship name having first and last name(i.e having space i..

Answer / sandeep modapathi

select name from ship where where PATINDEX ('% %',name )>0

Is This Answer Correct ?    1 Yes 2 No

If suppose in a table ship(name,year),find ship name having first and last name(i.e having space i..

Answer / suresh

select name,year
from ship
where name like '%,%';

Is This Answer Correct ?    1 Yes 8 No

If suppose in a table ship(name,year),find ship name having first and last name(i.e having space i..

Answer / dhiraj

select Name
from ship
where name in ('Saint Louis','Jet Lake')

Is This Answer Correct ?    1 Yes 10 No

Post New Answer

More SQL Server Interview Questions

What keyword you will use to get schema appended to the result set of a ‘for xml’ query?

0 Answers  


What is the purpose of the tempdb database?

0 Answers  


How you trouble shoot when any job fails

0 Answers  


What are the advantages of using cte?

0 Answers  


How to get a list of columns in a view using "sys.columns" in ms sql server?

0 Answers  






How to Create Login and User through query in Sql server 2005.and also how to delete Login and User through query?

2 Answers  


What is the difference between a fill factor of 100 and 0?

0 Answers  


About types of indexes in SQL server ?

2 Answers   Cognizant,


What is lock escalation? : sql server database administration

0 Answers  


What is pessimistic concurrency?

0 Answers  


How to test subquery results with the exists operator?

0 Answers  


What is normalization of database? What are its benefits?

0 Answers  


Categories