Tutorial SQLServer 06

Telechargé par youcef hedibel
SQL
SQL
Transact-SQL
TrueFalse
Transact-SQL
Value1 = Value2
SQL
Value1Value2True
False
Value1 <> Value2
True
False
Transact-SQL<>
Value1 < Value2
Value1 > Value2
TrueFalse
<=>=
Value1 >= Value2
Value1 <= Value2
Value1Value2<>
True<>False
SQLTrue
False
Transact-SQL
Keyword Expression
Statement
BEGINEND
SQLExpressionSQLStatement
BEGIN
END
SQL
BEGIN
END
Keyword Expression
BEGIN
Statement Line 1
Statement Line 2
Statement Line n
END
BEGINEND
Keyword Expression
BEGIN
Statement
END
BEGINEND
IF
IF
Transact-SQL
IF Condition
Statement
IF
TrueFalse
DECLARE @DateHired As DateTime,
@CurrentDate As DateTime
SET @DateHired = '1996/10/04'
SET @CurrentDate = '2007/04/11'
IF @DateHired < @CurrentDate
PRINT 'You have the experience required for a new promotion
in this job'
GO
IF..ELSE
IF
ELSE
DECLARE @DateHired As DateTime,
@CurrentDate As DateTime
SET @DateHired = '1996/10/04'
SET @CurrentDate = '1995/04/11'
IF @DateHired < @CurrentDate
PRINT 'You have the experience required for a new promotion
in this job'
ELSE
PRINT 'Sorry, you have NOT the experience required'
GO
CASE...WHEN...THEN
CASE
CASE Expression
WHEN Value1 THEN Result
WHEN Value2 THEN Result
1 / 15 100%

Tutorial SQLServer 06

Telechargé par youcef hedibel
La catégorie de ce document est-elle correcte?
Merci pour votre participation!

Faire une suggestion

Avez-vous trouvé des erreurs dans linterface ou les textes ? Ou savez-vous comment améliorer linterface utilisateur de StudyLib ? Nhésitez pas à envoyer vos suggestions. Cest très important pour nous !