Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between sql statements and clause

Tags:

sql

mysql

What is the difference between sql statements and clause

like image 757
user2201462 Avatar asked Mar 26 '13 04:03

user2201462


People also ask

What is the difference between a WHERE clause and HAVING clause of SQL SELECT statement?

What is the Difference between Where and Having Clause in SQL? If “Where” clause is used to filter the records from a table that is based on a specified condition, then the “Having” clause is used to filter the record from the groups based on the specified condition.

What is considered a SQL statement?

A SQL statement is a set of instruction that consists of identifiers, parameters, variables, names, data types, and SQL reserved words that compiles successfully. Analysis Services creates an implicit transaction for a SQL statement if a BeginTransaction command does not specify the start of a transaction.

Is a SQL statement the same as a SQL query?

A statement is the general term for a piece of complete, correct SQL that you can send to a DBMS. A query is a statement that will return data, thus a query is a special kind of statement.


1 Answers

The following statement:

SELECT foo FROM bar JOIN quux WHERE x = y;

is made up of the following clauses:

  • WHERE x = y
  • SELECT foo
  • FROM bar
  • JOIN quux
like image 77
Barmar Avatar answered Oct 24 '22 17:10

Barmar