Tag Archives: sql

How to limit the number of rows with both lower and upper bounds returned by an Oracle query after ordering?

    How to retrieve only the Nth row from a table?     Starting with Oracle 12c there is a syntax available to limit rows or start at offsets. Resource: http://stackoverflow.com/questions/470542/how-do-i-limit-the-number-of-rows-returned-by-an-oracle-query-after-ordering

Posted in Uncategorized | Tagged , , , , , , , | Leave a comment

Spring JdbcTemplate Querying Example

Querying for Multiple Rows Now, query or extract multiple rows from database, and convert it into a List. Map it manually In mutiple return rows, RowMapper is not supported in queryForList() method, you need to map it manually. For more … Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment

Finding a constraint in Oracle

…where “X” is the constraint name I’m looking for For more detailed explanations http://www.databasejournal.com/features/oracle/article.php/3665591/Finding-Foreign-Key-Constraints-in-Oracle.htm

Posted in Uncategorized | Tagged , , | Leave a comment

Search for column names in an Oracle DB

…where “X” is the column name I’m looking for Source: DZone Snippets http://snippets.dzone.com/posts/show/539#related

Posted in Uncategorized | Tagged , , | Leave a comment

Finding Duplicates with SQL

Here’s a handy query for finding duplicates in a table. Suppose you want to find all email addresses in a table that exist more than once: SELECT email, COUNT(email) AS NumOccurrences FROM users GROUP BY email HAVING ( COUNT(email) > … Continue reading

Posted in Uncategorized | Tagged , , | Leave a comment