Having Clause Snippets


18 January, 2012   

SQL GROUP BY Clause returns group of rows. An example code for SQL GROUP BY clause

20 February, 2012   

SQL select query to show records with specify date in where clause

07 September, 2014   

The "WITH CHECK OPTION" is used to indicate that Oracle will prevent any changes to the table or view that would produce rows that are not included in the subquery. When used in the subquery of a DML statement, you can specify this clause in a subquery in the FROM clause but not in subquery in the WHERE clause.

04 January, 2012   

SQL example Code for SELECT statement with HAVING clause

13 March, 2012   

PL/SQL code example Using the HAVING Clause

20 February, 2012   

SQL select query with between date to show records in where clause

PL/SQL code example for using the MAX function with having clause

18 January, 2012   

You can combine with SQL JOIN clause to show department name with count.

02 November, 2014   

The RETURNING clause was implemented as part of the Oracle 10g release and is used to return information about the effected rows after issuing Data Manipulation Language (DML) statements.

If we wanted to select only certain entries of our table, then we would use the WHERE clause .

29 March, 2015   

When creating an index, the default method Oracle uses to sort the index is in ascending order (SORT). However, if the rows are already stored in the database in ascending order you can use the NOSORT clause to skip the sorting process. If neither SORT or NOSORT is provided, Oracle will use SORT as the clause.

28 June, 2014   

Starting in Oracle 9i, you can use the case statement within an SQL statement. It has the functionality of an IF-THEN-ELSE statement.

19 February, 2012   

Throwtest an application that demonstrates how to define, throw, and handle exceptions. This application doesn't do anything other than print out some text, but if you might want to study it and play around with it to learn more about how exceptions work in Java. See the usage instructions in the source code.

08 September, 2012   

SQL query to know total number of employee on each department.

01 December, 2011   

The following code block shows how to run DML statements in PL/SQL. Basically they look similar to the SQL. Note that the SELECT statement retrieves the single-row value and store into a variable using INTO clause.

Note that you must include the unit ExtActns in the uses clause.

In order for this to work, you will need to copy mysqldump.exe and mysql.exe from the MySQL bin Program Files folder into the same directory as your executing PHP script. If you know the direct path to these for your server, you can use those instead.

07 August, 2014   

All hints except /*+ rule */ cause the CBO to be used. Therefore, it is good practise to analyze the underlying tables if hints are used (or the query is fully hinted.

How to parse a token list into functors (structured terms) in Prolog. The book "Logic in Prolog" by Gibbins has some good example code See http://www.ddj.com/184404172, listing 9 for the little language

This function builds an HTML select list from from data retrieved from a mySQL table.