Results 1 to 2 of 2

Thread: Correct SQL syntax?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2002
    Posts
    101

    Correct SQL syntax?

    Could you write an SQL statement such as:

    Select * from tablename where lastname = 'a%'

    would this extract all records from the table with lastname beginning with'a' rather than using the LIKE key word?

  2. #2
    A SQL Server fool GaryMazzone's Avatar
    Join Date
    Aug 2005
    Location
    Dover,NH
    Posts
    7,493

    Re: Correct SQL syntax?

    No you need the Like Keyword the = sign would only match a% as a last name
    Sometimes the Programmer
    Sometimes the DBA

    Mazz1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width