Home » Archive

Articles tagged with: SQL

Written By: techieDan on February 10, 2011 One Comment
Track Records on Database using DB2

For Database Administrators and Developers, this is a common practice. Sometimes we would love to track who has accessed a particular record from the users’ perspective based on ID and time. The usage of TIMESTAMP would be the best way.

Tags: [, , ]
Written By: techieDan on January 19, 2011 2 Comments
Top 10 Results using SQL on DB2

Well, you can have the all common SQL, but it works differently for most of the DB systems. We have different syntaxes for MS-SQL, mySQL and the DB2. There are many more. Though we will cover the DB2 today

Tags: [, ]
Written By: techieDan on January 11, 2011 One Comment
Alter Table in Aqua Data Studio 4.7

Unable to alter the table in a database? Might have been a simple mistake from typing something unnecessary. It’s just that simple.

Tags: [, , ]
Written By: techieDan on December 17, 2009 2 Comments
Hibernate Error : exception setting property value

Been playing around with Hibernate and mapping classes with Java. A reason why Hibernate is useful is so to facilitate users to stop writing pure SQL for queries and reduce code redundancy. A slight note, Hibernate also works well with the .NET platform.

Though there was this error which TechieDan experienced

org.springframework.orm.hibernate3.HibernateSystemException: [...]

Written By: techieDan on March 17, 2009 No Comment

a programmer uses PreparedStatement instead of Statement when doing SQL queries in my projects. I found out that I can indelibly hacked into the system when I use SQL injection

Tags: [, ]
Written By: techieDan on January 21, 2009 3 Comments

For those Java like programmers, they will be using pure SQL statements to get the whole of a table by typing the typical SQL query statement.

String SQL = “select * from tablename where condition = ?”;

From then onwards it can be passed to a POJO to be declared but everything has to be done one [...]

Tags: [, , ]
Written By: techieDan on March 15, 2008 No Comment

Coding have never been the same!!! Some bad habits when writing codes which are redundant

String[] special = {“a1″,”a2″,”a3″,”a4″};

Connection con = null;

PreparedStatement stmt = null;

PreparedStatement stmt2 = null;

ResultSet rs = null;

ResultSet rs2 = null;

Class.forName (“com.mysql.jdbc.Driver”)

conn = DriverManager.getConnection (url, userName, password);

String [...]

Tags: [, , ]
Written By: techieDan on February 13, 2008 No Comment

mySQL and msSQL has a similar SQL syntax but not the same. To have a grasp of what does this mean, let’s have an exercise to get 10 rows from a table with mySQL.

select * from [tablename] limit 10

Now if you were to run this sql query above on msSQL server you’ll either get a wrong sql [...]

Tags: [, , ]
  Copyright © 2009 TechieDan, All rights reserved.| Powered by WordPress