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

Explain the categories of stored procedure i.e. System stored procedure, local stored procedure, temporary stored procedure, extended stored procedure, remote stored procedure?

0 Answers  


Can you explain what is indexed view? How to create it?

0 Answers  


How to delete duplicate records based on single column from a table?

0 Answers   Petranics Solutions,


Write a query for primary key constraint with identity key word?

0 Answers   MindCracker,


What is difference between delete & truncate commands?

0 Answers  






What is the difference between ddl and dml?

0 Answers  


What are the different types of collation sensitivity in sql server?

0 Answers  


What is difference between table aliases and column aliases? Do they affect performance?

0 Answers  


Define inner join? Explain with an example?

0 Answers  


How to select an exiting database using mssql_select_db()?

0 Answers  


What is the purpose of grouping data in a report?

0 Answers  


How to check table values in sql server?

0 Answers  


Categories