fixed unsupported text formatting within <code> tags (for SQL statements)
This commit is contained in:
parent
876973a8cb
commit
cc85ccca1a
@ -1,6 +1,6 @@
|
||||
Syntax:
|
||||
<code>
|
||||
//operand// [NOT ]EXISTS (//subquery//)
|
||||
<operand> [NOT ]EXISTS (<subquery>)
|
||||
</code>
|
||||
The EXISTS operator returns TRUE if the subquery returns one or more rows and FALSE otherwise.
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
Syntax:
|
||||
<code>
|
||||
//operand// IN (//subquery//|//value list//)
|
||||
<operand> IN (<subquery>|<value list>)
|
||||
</code>
|
||||
An IN conditional expression returns true if the //operand// is found from result of the //subquery//
|
||||
or if its in the specificied comma separated //value list//, hence the IN expression is always false if the result of the subquery
|
||||
|
@ -1,8 +1,8 @@
|
||||
<code>
|
||||
DELETE FROM //component_name//
|
||||
[WHERE //where_condition//]
|
||||
DELETE FROM <component_name>
|
||||
[WHERE <where_condition>]
|
||||
[ORDER BY ...]
|
||||
[LIMIT //record_count//]
|
||||
[LIMIT <record_count>]
|
||||
</code>
|
||||
|
||||
* The DELETE statement deletes records from //component_name// and returns the number of records deleted.
|
||||
@ -12,7 +12,7 @@ Without WHERE clause, all records are deleted.
|
||||
|
||||
* If the ORDER BY clause is specified, the records are deleted in the order that is specified.
|
||||
|
||||
* The LIMIT clause places a limit on the number of rows that can be deleted.
|
||||
* The LIMIT clause places a limit on the number of rows that can be deleted.
|
||||
The statement will stop as soon as it has deleted //record_count// records.
|
||||
|
||||
|
||||
@ -30,6 +30,6 @@ $rows = $q->delete('Account')
|
||||
->from('Account a')
|
||||
->where('a.id > ?', 3)
|
||||
->execute();
|
||||
|
||||
|
||||
print $rows; // the number of affected rows
|
||||
</code>
|
||||
|
@ -1,8 +1,8 @@
|
||||
Syntax:
|
||||
Syntax:
|
||||
|
||||
|
||||
<code>
|
||||
FROM //component_reference// [[LEFT | INNER] JOIN //component_reference//] ...
|
||||
FROM <component_reference> [[LEFT | INNER] JOIN <component_reference>] ...
|
||||
</code>
|
||||
|
||||
The FROM clause indicates the component or components from which to retrieve records.
|
||||
@ -18,7 +18,7 @@ For each table specified, you can optionally specify an alias.
|
||||
SELECT u.*, p.* FROM User u LEFT JOIN u.Phonenumber
|
||||
|
||||
SELECT u.*, p.* FROM User u, u.Phonenumber p
|
||||
</code>
|
||||
</code>
|
||||
|
||||
* //INNER JOIN// produces an intersection between two specified components (that is, each and every record in the first component is joined to each and every record in the second component).
|
||||
So basically //INNER JOIN// can be used when you want to efficiently fetch for example all users which have one or more phonenumbers.
|
||||
|
@ -2,15 +2,15 @@ SELECT statement syntax:
|
||||
<code>
|
||||
SELECT
|
||||
[ALL | DISTINCT]
|
||||
//select_expr//, ...
|
||||
[FROM //components//
|
||||
[WHERE //where_condition//]
|
||||
[GROUP BY //groupby_expr//
|
||||
<select_expr>, ...
|
||||
[FROM <components>
|
||||
[WHERE <where_condition>]
|
||||
[GROUP BY <groupby_expr>
|
||||
[ASC | DESC], ... ]
|
||||
[HAVING //where_condition//]
|
||||
[ORDER BY //orderby_expr//
|
||||
[HAVING <where_condition>]
|
||||
[ORDER BY <orderby_expr>
|
||||
[ASC | DESC], ...]
|
||||
[LIMIT //row_count// OFFSET //offset//}]
|
||||
[LIMIT <row_count> OFFSET <offset>}]
|
||||
</code>
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ The SELECT statement is used for the retrieval of data from one or more componen
|
||||
SELECT a.name, a.amount FROM Account a
|
||||
</code>
|
||||
|
||||
* An asterisk can be used for selecting all columns from given component. Even when using an asterisk the executed sql queries never actually use it
|
||||
* An asterisk can be used for selecting all columns from given component. Even when using an asterisk the executed sql queries never actually use it
|
||||
(Doctrine converts asterisk to appropriate column names, hence leading to better performance on some databases).
|
||||
<code>
|
||||
SELECT a.* FROM Account a
|
||||
|
@ -1,13 +1,13 @@
|
||||
Syntax:
|
||||
<code>
|
||||
WHERE //where_condition//
|
||||
WHERE <where_condition>
|
||||
</code>
|
||||
|
||||
* The WHERE clause, if given, indicates the condition or conditions that the records must satisfy to be selected.
|
||||
|
||||
|
||||
|
||||
* //where_condition// is an expression that evaluates to true for each row to be selected.
|
||||
* //where_condition// is an expression that evaluates to true for each row to be selected.
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user