select names starts with a,b,c
Answers were Sorted based on User's Feedback
Answer / lakshmi narayanan r
SELECT * FROM abc a WHERE a.ename LIKE '[a-c]%'
| Is This Answer Correct ? | 19 Yes | 1 No |
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 |
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 |
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 |
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 |
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 |
Answer / roopesh kumar
Select * From emp Where substr(ename,1,1) In
('a', 'b', 'c', 'S');
| Is This Answer Correct ? | 1 Yes | 4 No |
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 |
How do I run a trace in sql server?
What is raid, and how it can influence database performance?
How to handle errors in Stored Procedures.
What are the differences between ms sql server & oracle?
How to swap the data of two columns in a table. both the columns containing varchar values.
What is an entity-relationship diagram (erd)?
How to create a testing table with test data in ms sql server?
Tell me what is log shipping?
Can we use custom code in ssrs?
If you are given access to a SQL Server, how do you find if the SQL Instance is a named instance or a default instance?
What is the difference between in and exists. Ex: select * from emp where empno in(....) and select * from emp where empno exists(....) What is the difference between a Join and Union and Union and UnionAll.
Does the order of columns in update statements matter?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)