Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

Sunday, November 25, 2012

Stored procedures in MySQL


Some links with useful examples for writting stored procedures:

Integer division in Java


The division of two integers in Java is also an integer.
E.g.    
    int a=5;
    int b=10;
    System.out.println(a/b);
It will output 0.

One could use double instead. 
E.g.
    double a=5;
    double b=10;
    System.out.println(a/b);
It will output 0.5.

More here: http://stackoverflow.com/questions/8110019/java-divison-with-two-integer-operands-not-working