|
|
![]() |
|
|
1. TEXT datatype SPLIT in MSSQL - to solve the 8000 limit set by varchar
|
|
By: Dave : 2010-04-06
|
|
Description: I have been frustrated with the 8000 limit set by the varchar data type in MSSQL. For procedures that required text length more than 8000 character limit, MSSQL offers the TEXT datatype. However there are not as many functions that are supported for TEXT datatype. For example if you would like to split the data string which is seperated by a delimitter, then it is not easy to split the text. |
|
Read the full article
|
|
3. What is Referential Integrity in databases?
|
|
By: Peter den Haan : 2008-12-27
|
|
Description: What happens when you start manipulating the records in your tables? You can edit the book information at will without any ill effects, but what would happen if you needed to delete a title? The entries in the Contribution table will still link to a nonexistent book. Clearly you can't have a contribution detail without the associated book title being present. So, you must have a means in place to enforce a corresponding book title for each contribution. This is the basis of enforcing referential integrity. You can enforce the validity of the data in this situation in two ways. One is by cascading deletions through the related tables; the other is by preventing deletions when related records exist. |
|
Read the full article
|
|
4. Handling CSV in Stored Procedures
|
|
By: Balmer : 2008-08-05
|
|
Description: You have a number of key values in CSV format(comma separated values), identifying a couple of rows in a table, and you want to retrieve these rows. If you are the sort of person who composes your SQL statements in client code, you might have something that looks like this: |
|
Read the full article
|
|
6. Calling a Stored Procedure from JDBC in Java
|
|
By: Watson : 2007-10-13
|
|
Description: JDBC allows you to call a database stored procedure from an application written in the Java programming language. The first step is to create a CallableStatement object. As with Statement and PreparedStatement objects, this is done with an open Connection object. A callableStatement object contains a call to a stored procedure; it does not contain the stored procedure itself. The first line of code below creates a call to the stored procedure SHOW_SUPPLIERS using the connection con. The part that is enclosed in curly braces is the escape syntax for stored procedures. When the driver encounters "{call SHOW_SUPPLIERS}", it will translate this escape syntax into the native SQL used by the database to call the stored procedure named SHOW_SUPPLIERS. |
|
Read the full article
|
|
9. JDBC Basics and JDBC Components
|
|
By: Henry : 2007-10-12
|
|
Description: This short code fragment instantiates a DriverManager object to connect to a database driver and log into the database, instantiates a Statement object that carries your SQL language query to the database; instantiates a ResultSet object that retrieves the results of your query, and executes a simple while loop, which retrieves and displays those results. It's that simple. |
|
Read the full article
|
|
10. SELECT Statements
|
|
By: Ivan Lim : 2007-10-12
|
|
Description: A SELECT statement, also called a query, is used to get information from a table. It specifies one or more column headings, one or more tables from which to select, and some criteria for selection. The RDBMS returns rows of the column entries that satisfy the stated requirements. A SELECT statement such as the following will fetch the first and last names of employees who have company cars: |
|
Read the full article
|
Next
|
|
![]() |
|