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

Can truncate be rolled back?

0 Answers  


Explain basic SQL queries with SELECT from where Order By, Group By-Having?

3 Answers   TetraSoft, Wipro,


What happens if you add a new index to large table?

0 Answers  


What is data source in connection string?

0 Answers  


How to configure odbc dsn with different port numbers?

0 Answers  






What are the advantages of using third-party tools?

0 Answers  


Explain unique key in sql server?

0 Answers  


Define the term DML, DDL and DTL?

1 Answers  


how can we know that how many users are connected in perticuler server??????

2 Answers  


How to recover from sql injection? : sql server security

0 Answers  


You have several tables, and they are joined together for querying. The tables contain both clustered indexes and non clustered indexes to optimize performance, how should you distribute the tables and their indexes onto different file groups?

0 Answers  


Which sql server table is used to hold the stored procedure script?

0 Answers  


Categories