SQL LIKE - Overview, syntax

          

SQL LIKE - Overview, syntax


SQL LIKE - Introduction and syntax

<<Previous  Next>>

SQL - Dec 03, 2008 at 18:00 PM by Rajmeet Ghai

Explain the SQL LIKE statement. Write SQL syntax for the SQL LIKE statement along with an example.

LIKE clause is used for pattern matching. % is used to match any string of any length where as _ allows you to match on a single character.

Syntax:
SELECT * FROM table_name WHERE column_name like 'pattern%';

Example:
SELECT * FROM employee WHERE emp_name like 'ma%';


SQL EXISTS

SQL EXISTS: If the subquery returns at least one row the EXISTS condition is considered "to be met"...............

SQL CONCATENATE

SQL CONCATENATE: This clause combine together (concatenate) the results from several different fields...............

SQL INTERSECT

SQL INTERSECT allows combining results of two or more select queries. If a record exists in one query and not in the other, it will be omitted from the INTERSECT results..............

SELECT DISTINCT

SELECT DISTINCT: It is used to select unique records from a table. Some tables may have duplicate values for a column. Distinct will eliminate these duplications...........

Explain the SQL UNION ALL statement. Write SQL syntax for the SQL UNION ALL statement along with an example.

SQL UNION ALL: The UNION ALL operator is used to combine the result-set of two or more SELECT statements Tables of both the select statement ................

<<Previous  Next>> 



Write your comment - Share Knowledge and Experience


 
Latest placement tests
Latest links
 
Latest MCQs
» General awareness - Banking » ASP.NET » PL/SQL » Mechanical Engineering
» IAS Prelims GS » Java » Programming Language » Electrical Engineering
» English » C++ » Software Engineering » Electronic Engineering
» Quantitative Aptitude » Oracle » English » Finance
Home | About us | Sitemap | Contact us | We are hiring