What are SQL Clauses and Operators?
366
18-Jul-2024
Updated on 18-Jul-2024
Ashutosh Kumar Verma
18-Jul-2024SQL Clauses and Operators
SQL Clause
An SQL statement is a part of an SQL statement that performs a specific task in querying or modifying data. Clauses help define the structure and parameters of an SQL query. Examples are:
SELECT- Specifies the columns to be retrieved from the table.
FROM- Specifies the table(s) from which data can be retrieved.
WHERE- Depending on specified conditions, rows are selected.
ORDER BY- Sorts the results by one or more characters.
SQL Operators
SQL operations are symbols or keywords used to perform operations on data in an SQL statement. Administrators define logical comparisons, calculations, or operations to be performed. Examples are:
‘=’- Equality operator, checks if two values are equal.
‘<’- Less than operator, checks if one value is less than another.
‘AND’- Logical operator, used to combine multiple conditions.
‘OR’- Logical operator, checks if any condition is true from multiple.
‘+’- Arithmetic operator, used to perform addition.
‘<>’ Or ‘!=’- Not equal operator, checks if two values are not equal.
Also, Read: Explain the Aggregate functions in the SQL server.