DB2 varchar时间选择

时间:2015-08-17 12:57:09

标签: sql db2

我有时间将MAJHMS字段存储为varchar,如:

  

93601

     

112737

我需要搜索

select * from table where majhms = 936

select * from table where majhms = 1136

但不是完整的6个符号112737

1 个答案:

答案 0 :(得分:1)

查看import java.util.*; public class RandomNumbers { public static void main(String[] args) { Scanner scan = new Scanner(System.in); System.out.println("Input Long Seed: "); long seed = scan.nextLong(); System.out.println("Input Modulus: "); int modulus = scan.nextInt(); System.out.println("Number of Iterations: "); int iterations = scan.nextInt(); int[] arrayBox =new int[modulus]; Random random = new Random(seed); for (int i=0;i<iterations;i++){ arrayBox[random.nextInt(modulus)]++; } for (int i=0; i<modulus; i++){ System.out.println("arrayBox["+i+"]="+arrayBox[i]); } } } 表达式,例如LIKE。 LIKE基于模式的过滤器。