Register Login

Login with your site account

Lost your password?

Not a member yet? Register now

WebclassesWebclasses
  • Home
  • Courses
    • Start Learning Here

      • Learn HTML
      • Learn CSS
      • Learn PHP
      • Learn JS
      • Learn SQL
      • Learn C
      • Learn C++
      • Learn 8051

      New Course

      8051 Micro-controller

      8051 Micro-controller

      Free
      Read More
  • Blog
  • Contact Us
    • Home
    • Courses
      • Start Learning Here

        • Learn HTML
        • Learn CSS
        • Learn PHP
        • Learn JS
        • Learn SQL
        • Learn C
        • Learn C++
        • Learn 8051

        New Course

        8051 Micro-controller

        8051 Micro-controller

        Free
        Read More
    • Blog
    • Contact Us
    • Home
    • All courses
    • SQL Programming

    SQL Programming

    mahethekiller
    (0 review)
    Free
    SQL Programming

    SQL Wildcards

    A Wildcard character can be used to substitute for any other character(s) in a string.

    Note: In SQL, wildcard characters are used with the SQL LIKE operator.

    With SQL, the wildcards are:
    Wildcard Description
    % A substitute for zero or more characters
    _ A substitute for a single character
    [charlist] Set and ranges of characters to match
    [^charlist] or [!charlist] Matches only a character NO
    SQL % Wildcard:
    Example:
    SELECT * FROM Customers
    WHERE City LIKE 'anu%';

    Note: SQL statement select all customers with a City starting with “anu”.

    Output:
    CustomerId CustomerName ContactName Address City PostalCode Country
    7 Anurag Rakesh 263 varma chauraha Kanpur 213101 India
    Example:
    SELECT * FROM Customers
    WHERE City LIKE '%pur%';

     Note: SQL statement select all customers with a City containing the pattern “pur”.

    Output:
    CustomerId CustomerName ContactName Address City PostalCode Country
    1 Mahendra Null Null lakhimpur 212501 India
    2 Abhishek Dev 23 lal chauk Jaunpur 212601 India
    3 Amit Mahek 453 Pakka Fatehpur 212701 India
    4 Divyanshu Rajesh 234 pani Fatehpur 212801 India
    7 Anurag Rakesh 263 varma chauraha Kanpur 213101 India
    SQL _ Wildcard:
    Example:
    SELECT * FROM Customers
    WHERE City LIKE '_aunpur';

    Note: SQL statement select all customers with a City starting with any character, followed by “aunpur”.

    Output:
    CustomerId CustomerName ContactName Address City PostalCode Country
    2 Abhishek Dev 23 lal chauk Jaunpur 212601 India
    SQL [charlist] Wildcard:
    Example:
    SELECT * FROM Customers
    WHERE City LIKE '[jap]%';

     Note: SQL statement select all customers with a City starting with “j”, “a”, or “p”.

    Output:
    CustomerId CustomerName ContactName Address City PostalCode Country
    2 Abhishek Dev 23 lal chauk Jaunpur 212601 India
    5 Himanshu Abhilash 123 civil line Allahabad 212901 India
    6 Shahwaz Anshuman 534 chaufatka Patna 213001 India
    Example:
    SELECT * FROM Customers
    WHERE City LIKE '[j-l]%';

     Note: SQL statement select all customers with a City starting with “j”, “k”, or “l”.

    Output:
    CustomerId CustomerName ContactName Address City PostalCode Country
    2 Abhishek Dev 23 lal chauk Jaunpur 212601 India
    7 Anurag Rakesh 263 varma chauraha Kanpur 213101 India
    1 Mahendra Null Null lakhimpur 212501 India
    Example:
    SELECT * FROM Customers
    WHERE City LIKE '[!jap]%';

    OR

    SELECT * FROM Customers
    WHERE City NOT LIKE '[jap]%';

     Note: SQL statement select all customers with a City NOT starting with “j”, “a”, or “p”.

    Output:
    CustomerId CustomerName ContactName Address City PostalCode Country
    1 Mahendra Null Null lakhimpur 212501 India
    3 Amit Mahek 453 Pakka Fatehpur 212701 India
    4 Divyanshu Rajesh 234 pani Fatehpur 212801 India
    7 Anurag Rakesh 263 varma chauraha Kanpur 213101 India

     

    Prev The SQL LIKE Operator
    Next SQL IN Operator
    • Description
    • Curriculum
    • Instructors
    • Reviews (0)

    Learn how to use SQL to store, query, and manipulate data. SQL is a special-purpose programming language designed for managing data in a relational database, and is used by a huge number of apps and organizations.

    SQL basics

    We’ll show you the basics of creating tables and selecting data in various different ways.

    Course Features

    • Lectures 41
    • Quizzes 0
    • Duration 50 hours
    • Skill level All levels
    • Language English
    • Students 0
    • Certificate No
    • Assessments Self
    • Share:
      • Lecture1.1
        SQL Introduction
        0m
      • Lecture1.2
        SQl Syntax
        0m
      • Lecture1.3
        SQL Create Database Statement
        0m
      • Lecture1.4
        SQL CREATE TABLE Statement
        0m
      • Lecture1.5
        SQL Constraints
        0m
      • Lecture1.6
        SQL NOT NULL Constraint
        0m
      • Lecture1.7
        SQL UNIQUE Constraint
        0m
      • Lecture1.8
        SQL PRIMARY KEY Constraint
        0m
      • Lecture1.9
        SQL FOREIGN KEY Constraint
        0m
      • Lecture1.10
        SQL CHECK Constraint
        0m
      • Lecture1.11
        SQL DEFAULT Constraint
        0m
      • Lecture1.12
        SQL INSERT INTO Statement
        0m
      • Lecture1.13
        SQL UPDATE Statement
        0m
      • Lecture1.14
        SQL DELETE Statement
        0m
      • Lecture1.15
        SQL SELECT Statement
        0m
      • Lecture1.16
        SQL SELECT DISTINCT Statement
        0m
      • Lecture1.17
        SQL WHERE Clause
        0m
      • Lecture1.18
        SQL AND & OR Operators
        0m
      • Lecture1.19
        SQL ORDER BY Keyword
        0m
      • Lecture1.20
        SQL SELECT TOP Clause
        0m
      • Lecture1.21
        The SQL LIKE Operator
        0m
      • Lecture1.22
        SQL Wildcards
        0m
      • Lecture1.23
        SQL IN Operator
        0m
      • Lecture1.24
        SQL BETWEEN Operator
        0m
      • Lecture1.25
        SQL Aliases
        0m
      • Lecture1.26
        SQL Joins
        0m
      • Lecture1.27
        SQL INNER JOIN
        0m
      • Lecture1.28
        SQL LEFT JOIN
        0m
      • Lecture1.29
        SQL RIGHT JOIN
        0m
      • Lecture1.30
        SQL FULL OUTER JOIN
        0m
      • Lecture1.31
        SQL UNION
        0m
      • Lecture1.32
        SQL SELECT INTO
        0m
      • Lecture1.33
        SQL INSERT INTO SELECT
        0m
      • Lecture1.34
        SQL CREATE INDEX
        0m
      • Lecture1.35
        SQL DROP INDEX, DROP TABLE, and DROP DATABASE
        0m
      • Lecture1.36
        SQL ALTER TABLE
        0m
      • Lecture1.37
        SQL AUTO INCREMENT
        0m
      • Lecture1.38
        SQL Views
        0m
      • Lecture1.39
        SQL Date Functions
        0m
      • Lecture1.40
        SQL NULL Values
        0m
      • Lecture1.41
        SQL General Data Types
        0m
    mahethekiller

    Reviews

    Average Rating

    0
    0 rating

    Detailed Rating

    5 stars
    0
    4 stars
    0
    3 stars
    0
    2 stars
    0
    1 star
    0

    You May Like

    8051 Micro-controller Read More
    mahethekiller

    8051 Micro-controller

    50
    0
    Free
    C ++ Programming Read More
    mahethekiller

    C ++ Programming

    20
    0
    Free
    C Programming Read More
    mahethekiller

    C Programming

    0
    0
    Free

    Leave A Reply Cancel reply

    Your email address will not be published. Required fields are marked *

    Latest Courses

    8051 Micro-controller

    8051 Micro-controller

    Free
    Javascript Programming

    Javascript Programming

    Free
    C ++ Programming

    C ++ Programming

    Free

    Recent Posts

    • How to Create a Basic CRUD application Using PHP and MySql
    • Login And Logout Script using PHP Sessions
    • How to Upload an image using Ajax and PHP

    Courses

    • HTML
    • CSS
    • Javascript
    • PHP

    Advanced

    • SQL
    • C Programming
    • C++ Programming
    • 8051 Microcontroller

    Links

    • Home
    • Blog
    • Courses

    Webclasses