Results 1 to 2 of 2

Thread: SQL (parentheses)

  1. #1
    Guest
    Can I use brackets to separate conditions in an SQL statement? (I am not in a position to test out this theory myself at the moment).

    for example:

    "SELECT * FROM Players WHERE (Surname BETWEEN 'A%' AND 'H%') AND PCode LIKE 'DE_ ___'"

    I want to keep the between condition separate from the other parts of the sentence, if not possible then I'll have to live with it!

    Thanks.
    Adam
    SQL newbie!

  2. #2
    PowerPoster BruceG's Avatar
    Join Date
    May 2000
    Location
    New Jersey (USA)
    Posts
    2,657
    Yes, you can.
    "It's cold gin time again ..."

    Check out my website here.

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