Learning PHP and MySQL: by Knowledge flow

Learning PHP and MySQL: by Knowledge flow

Author:Knowledge flow [flow, Knowledge]
Language: eng
Format: epub
Publisher: Knowledge flow
Published: 2015-03-15T22:00:00+00:00


IN

Equal to one of the multiple possible value

ID IN (100,120,134)

AS

Used to change name when viewing the result or the particular value

Select student AS ‘section a’

IS NOT DISTINCT FORM

Equal to value given or both are missing data

Loan IS NOT DISTINCT FORM-APPLICABLE

Conditions

SQL expression-

Case- It is one of the searching techniques of finding the matching case. It was used in SQL-92.

Example

CASE WHEN N > 0

THEN ‘POSITIVE VALUE’

WHEN<0

THEN ‘NEGATIVE VALUE’

ELSE

‘ZERO’

When- This condition is the source through which the data is compared with the output which is set is similar to its condition. That time the action which has to be take is defined using when the condition with the when statement is stated.

Example

CASE a

WHEN 1

THEN ‘ONE ORANGE’

WHEN 2

THEN ‘TWO ORANGES’

ELSE

‘CANNOT COUNT THAT VALUE’

Then- This statement is used to execute particular value or display particular value when the condition in WHEN statement is satisfied.

Example

CASE b

WHEN 3

THEN ‘three ORANGE’

WHEN 4

THEN ‘four ORANGES’

ELSE

‘CANNOT COUNT THAT VALUE’.

Else- When the when condition is not satisfied the process leads to another option, that is defined as else statement.

Example

WHEN 5

THEN ‘FIVE ORANGES’

ELSE

‘CANNOT COUNT THAT VALUE’.

End- It is used to terminate the program which leads the system to stop the execution.

Example

CASE x

WHEN 1

THEN ‘COUNT 1’

WHEN 2

THEN ‘COUNT 2’

ELSE ‘ERROR’

END



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.