Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


T-SQL


T-SQL

Author
Message
chenthilar
chenthilar
Forum Newbie
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: General Forum Members
Points: 7 Visits: 104
Answer is : Operator

Predicate Is an expression that evaluates to TRUE, FALSE, or UNKNOWN. Predicates are used in the search condition of WHERE clauses and HAVING clauses, the join conditions of FROM clauses, and other constructs where a Boolean value is required.

IN is the logical operator

Please visit the below one to know all the logical operator

http://msdn.microsoft.com/en-us/library/ms189773.aspx
Bhavesh_Patel
Bhavesh_Patel
SSChasing Mays
SSChasing Mays (621 reputation)SSChasing Mays (621 reputation)SSChasing Mays (621 reputation)SSChasing Mays (621 reputation)SSChasing Mays (621 reputation)SSChasing Mays (621 reputation)SSChasing Mays (621 reputation)SSChasing Mays (621 reputation)

Group: General Forum Members
Points: 621 Visits: 297
I answered 'Operator' - And guess what, I got it wrong. w00t

I agree with all the above members, 'IN' is an operator.



Bhavesh Patel

http://bhaveshgpatel.wordpress.com/
Julie Hargraves
Julie Hargraves
Hall of Fame
Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)

Group: General Forum Members
Points: 3021 Visits: 461
Allow me to jump on the bandwagon here and say that 'IN' by itself is a logical operator. 'SomeField IN ( 1, 2, 3 )' would be considered a predicate, but by itself, 'IN' does not evaluate to TRUE, FALSE, or UNKNOWN.
Noel McKinney
Noel McKinney
SSCrazy
SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)

Group: General Forum Members
Points: 2017 Visits: 796
I'll chime in as well to say that IN is an operator. See BOL for list of Logical Operators

http://msdn.microsoft.com/en-us/library/ms189773(SQL.90).aspx
Dave62
Dave62
Hall of Fame
Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)

Group: General Forum Members
Points: 3060 Visits: 2716
I can understand the confusion with this question since msdn refers to IN many different ways. A number of msdn links have already been posted to defend different answers and here is another one.

http://msdn.microsoft.com/en-us/library/ms177682.aspx

In the remarks section the first sentence refers to IN as a clause. "...values (many thousands) in an IN clause can..."

Also, the article referenced is specifically for IN (Transact-SQL) not predicates or logical operators.

Dave
LostAccount
LostAccount
SSCarpal Tunnel
SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)

Group: General Forum Members
Points: 4401 Visits: 1424
Somehow I had the feeling this question would have a controversial "correct" answer because it was just too obvious that it should be "Operator".
bitbucket-25253
bitbucket-25253
SSCertifiable
SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)

Group: General Forum Members
Points: 5695 Visits: 25280
As one who has been beaten from pillar to post during the discussion of QOD's that I have submitted and which where published ... I am sorry to say that I do not think the author of this QOD performed due diligence in their search for the justification of the supposed correct answer.

But my thoughts do not change the outcome, the only individual empowered to do that is Steve Jones.

Hence let's ask Steve Jones to ajudicate.

If everything seems to be going well, you have obviously overlooked something.

Ron

Please help us, help you -before posting a question please read

Before posting a performance problem please read
subha.msc2007
subha.msc2007
SSC-Enthusiastic
SSC-Enthusiastic (103 reputation)SSC-Enthusiastic (103 reputation)SSC-Enthusiastic (103 reputation)SSC-Enthusiastic (103 reputation)SSC-Enthusiastic (103 reputation)SSC-Enthusiastic (103 reputation)SSC-Enthusiastic (103 reputation)SSC-Enthusiastic (103 reputation)

Group: General Forum Members
Points: 103 Visits: 140
hai
Christian Buettner-167247
Christian Buettner-167247
SSCrazy
SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)

Group: General Forum Members
Points: 2951 Visits: 3889
Dave62 (1/7/2010)
I can understand the confusion with this question since msdn refers to IN many different ways. A number of msdn links have already been posted to defend different answers and here is another one.

http://msdn.microsoft.com/en-us/library/ms177682.aspx

In the remarks section the first sentence refers to IN as a clause. "...values (many thousands) in an IN clause can..."

Also, the article referenced is specifically for IN (Transact-SQL) not predicates or logical operators.

Dave


Well yet another term - see here for details with regards to the "logical" IN clause.
http://www.articleworld.org/index.php/Clause_%28logic%29
Edit: Just to provide an example, the IN clause in predicate
Edit2: added operator to IN clause
fieldx IN (1,2,3)
is
IN (1,2,3)


Not to mix up with "grammar" clauses like the SELECT or FROM clause.

Best Regards,

Chris Büttner
sjimmo
sjimmo
Hall of Fame
Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)

Group: General Forum Members
Points: 3352 Visits: 2846
This QOD actually has 2 answers that are correct, and should reflect such.

The "IN" statement can be used as both a predicate and an operator. See BOL:

Logical Operator
IN - TRUE if the operand is equal to one of a list of expressions.

Predicate:
Is an expression that evaluates to TRUE, FALSE, or UNKNOWN. Predicates are used in the search condition of WHERE clauses and HAVING clauses, the join conditions of FROM clauses, and other constructs where a Boolean value is required.

Thus, with the answers set up the way that they are, with only one answer being selectable, we should get credit for either answer being correct.

Steve Jimmo
Sr DBA
“If we ever forget that we are One Nation Under God, then we will be a Nation gone under." - Ronald Reagan
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search