select names starts with a,b,c

Answers were Sorted based on User's Feedback



select names starts with a,b,c..

Answer / lakshmi narayanan r

SELECT * FROM abc a WHERE a.ename LIKE '[a-c]%'

Is This Answer Correct ?    19 Yes 1 No

select names starts with a,b,c..

Answer / prashant

SELECT NAMES FROM TABLE_NAME
WHERE NAME LIKE 'a%'
or NAME LIKE 'b%'
or NAME LIKE 'c%'

Is This Answer Correct ?    16 Yes 6 No

select names starts with a,b,c..

Answer / naren

Lakshmi Narayanan u r correct.
But we can use the table only.

SELECT * FROM abc WHERE ename LIKE '[a-c]%'

I think its better...

Is This Answer Correct ?    10 Yes 2 No

select names starts with a,b,c..

Answer / senthil

SELECT NAMES FROM TABLE_NAME
WHERE lower(NAME) LIKE 'a%'
or lower(NAME) LIKE 'b%'
or lower(NAME) LIKE 'c%';

Is This Answer Correct ?    8 Yes 3 No

select names starts with a,b,c..

Answer / rajkumar v

SELECT * FROM TABLE_NAME WHERE Colum_Name LIKE '[a-c]%'
OR
SELECT * FROM TABLE_NAME WHERE Colum_Name LIKE '[a,b,c]%'

Is This Answer Correct ?    1 Yes 0 No

select names starts with a,b,c..

Answer / gopinath

SELECT NAMES FROM TABLE_NAME
WHERE NAME LIKE 'a%'
or NAME LIKE 'b%'
or NAME LIKE 'c%'

Is This Answer Correct ?    2 Yes 2 No

select names starts with a,b,c..

Answer / roopesh kumar

Select * From emp Where substr(ename,1,1) In
('a', 'b', 'c', 'S');

Is This Answer Correct ?    1 Yes 4 No

select names starts with a,b,c..

Answer / naren

select * from table_name where Name like 'A%'
union
select * from table_name where Name like 'B%'
union
select * from table_name where Name like 'C%'

Is This Answer Correct ?    6 Yes 10 No

Post New Answer

More SQL Server Interview Questions

What are the types of indexes?

0 Answers  


What are various limitations of the views?

0 Answers  


what operator performs pattern matching?

2 Answers  


Which data types generate inaccurate results if used with an = or <> comparison in a where clause of a sql statement?

0 Answers  


Difference between group by clause and having clause in SQL?

0 Answers   Flextronics,






what is a check constraint?

0 Answers  


Difeerence between ssis 2005 and ssis2008?

1 Answers   Convergys,


How raid can influence database performance?

0 Answers  


What's the information that can be stored inside a bit column?

0 Answers  


Define candidate key, alternate key, and composite key.

0 Answers  


How to generate create view script on an existing view?

0 Answers  


how to write test cases for testing databases,especially for testing and writing test cases for stored procedures.any real time database testers.please answer me.

0 Answers  


Categories