Macromedia Dreamweaver 8 UNLEASHED Free Open Book

Macromedia Dreamweaver 8 UNLEASHED

Previous Page
Next Page

Operators

In the previous section, you were introduced to the use of the & operator. Operators are used in programming languages to aid in the evaluation of expressions. The following table lists operators with which you should become familiar:

Operator

Description

*

The multiplication operator is used when multiplying fields or values.

/

The divide operator is used when dividing fields or values.

The minus operator is used when subtracting fields or values.

>

The greater-than operator is used in WHERE clauses to determine whether a first value is greater than the second, such as:

SELECT *
FROM Employees 
WHERE EmployeeID > 10 

 

The result returns all the EmployeeIDs after 10.

<

The less-than operator is used in WHERE clauses to determine whether a first value is less than the second, such as:

SELECT * 
FROM Employees
WHERE EmployeeID < 10

 

The result returns EmployeeIDs 19.

>=

The greater than or equal to operator is used in WHERE clauses to determine whether a first value is greater than or equal to the second, such as:

SELECT * 
FROM Employees
WHERE EmployeeID >= 10 

 

The result returns EmployeeIDs of 10 and greater.

<=

The less than or equal to operator is used in WHERE clauses to determine whether a first value is less than or equal to the second, such as:

SELECT * 
FROM Employees
WHERE EmployeeID <= 10

 

The result returns all the EmployeeIDs between 1 and 10.

<>, !=

Used to check whether a value is not equal to a second.

AND

Typically used with the WHERE clause in the SELECT statement. The AND operator returns a second value, such as:

SELECT * 
FROM Employees
WHERE EmployeeID = 1 AND EmployeeID = 2

OR

Typically used with the WHERE clause in the SELECT statement. The OR operator can be used when a certain condition needs to be met or when you can settle for a second, such as:

SELECT * 
FROM Employees
WHERE EmployeeID = 1 OR EmployeeID = 2 

LIKE

The LIKE operator is generally used with WHERE clauses when a wildcard needs to be performed, such as:

SELECT * 
FROM Employees
WHERE Name LIKE 'A%'

 

This result returns all employees whose names start with A. Our result returns Ada and Agnes because both their names begin with the letter A.

NOT

Typically used in conjunction with the LIKE operator, the NOT operator is used when a value is not going to be LIKE the value of a second, such as:

SELECT * 
FROM Employees
WHERE Name NOT LIKE 'A%'

 

In this case, all names other than Ada and Agnes are returned.

%

The multiple-character operator is similar to the underscore operator except that it allows for multiple characters, whereas the underscore operator allows for only two. This operator is used in more situations than the underscore operator.

_

The underscore operator is used with WHERE clauses and is performed when you do not know the second value, such as:

SELECT * 
FROM Employees
WHERE BillingShippingState LIKE 'A_'

 

The result, in this case, returns all states that begin with the letter A, such as AK, AL, AR, and AZ.


Previous Page
Next Page
Index: [SYMBOL][A][B][C][D][E][F][G][H][I][J][L][M][N][O][P][Q][R][S][T][U][V][W][X][Z]


     Main Menu
Macromedia Dreamweaver 8 UNLEASHED
Table of Contents
Copyright
About the Author
Acknowledgments
We Want to Hear from You!
Reader Services
Bonus Content
Introduction
Part I. Getting Up to Speed with Dreamweaver 8
Part II. Static Web Page Development
Part III. Team Collaboration and Task Automation
Part IV. Incorporating Multimedia and Animation
Part V. Dynamic Web Page Creation
Chapter 21. Introduction to Web Applications
Chapter 22. Working with Server-Side Technologies
Chapter 23. A Database Primer
Chapter 24. A SQL Primer
The Structured Query Language
Basic SQL
Expressions
Operators
Functions
Joins
Subqueries
Using Access to Generate Queries
Using MySQL Maestro to Generate Queries
Summary
Part VI. Building Dynamic Web Pages
Part VII. Appendixes and Bonus Content on the Website
Index


More Books
PHP Hacks
Processing Xml With Java - A Guide To Sax, Dom, Jdom, Jaxp, And Trax
The Koran (Holy Qur'an)
Macromedia Flash 8 Bible
Search Engine Optimization for Dummies
YouTube Traffic
PHP 5 for Dummies
Harry Potter and The Chamber of Secrets
Harry Potter and the Sorcerer's Stone
The Pilgrim's Progress
Wireless Hacks
Flash Hacks. 100 Industrial-Strength Tips & Tools
PayPal Hacks. 100 Industrial-Strength Tips and Tools
Amazon Hacks
Pdf Hacks
The Da Vinci Code
Google Hacks
The Holy Bible
Windows XP For Dummies
Harry Potter and the Half-Blood Prince
Seo Book
Upgrading and Repairing Networks
Macromedia Dreamweaver 8 UNLEASHED
Windows XP Annoyances
Windows XP Hacks
Microsoft Windows XP Power Toolkit
Teach Yourself MS Office In 24Hours
iPod & iTunes Missing Manual
PC Hacks 100 Industrial-Strength Tips and Tools
PC Overclocking, Optimization, and Tuning - 2th Edition
PC Hardware In A Nutshell 3rd Edition
PC Hardware in a Nutshell, 2nd Edition
Upgrading and Repairing PCs
Google for Dummies
MySQL Cookbook
Teach Yourself Macromedia Flash 8 In 24 Hours
PHP CookBook
Sams Teach Yourself JavaScript in 24 Hours
PHP5 Manual
Free Games Paper Airplanes
500 Juegos Gratis 500 Giochi Gratis 500 Jeux Gratuits 500 Jogos Gratis 500 Kostenlose Spiele