Design a site like this with WordPress.com
Get started

Comparison Operators in Different Languages

NameComparison Operators
Python/Java/C/C#Javascript PHPSQLPowershell
Equal to=======-eq
Greater than>>>>-gt
Less than<<<<-lt
Greater than or Equal to>=>=>=>=-ge
Less than or Equal to<=<=<=<=-le
Not Equal to!=!=!=<>-ne
Identical===
Not Identical!==
Spaceship <=> 
Equal value and equal type ===
Not equal value or not equal type !==
Wildcard Comparison-like
Wildcard Comparison -notlike
Regular Expression Comparison-match
Regular Expression Comparison -notmatch
Replace Operator-replace
Containment operator -contains
Containment operator -notcontains
Like –contains, but with the operands reversed.(PowerShell 3.0) -in
Like –notcontains, but with the operands reversed.(PowerShell 3.0) -notin
Matches a value in a list IN()
Negates a conditionNOT
Within a range (inclusive) BETWEEN
NULL ValueIS NULL
Not-NULL ValueIS NOT NULL
Pattern matching with % and _ LIKE
Condition is met if subquery returns at least one row EXISTS

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Blog at WordPress.com.

Up ↑

%d bloggers like this: