Here you can find the source of createTable(String query)
public static void createTable(String query)
//package com.java2s; /*/*from w w w. j a v a 2 s . c o m*/ * The information in this document is subject to change without notice and * does not represent a commitment by Headstrong Corporation. The software * and/or databases described in this document are furnished under a license * agreement and may be used or copied only in accordance with the terms of * the agreement. * * Copyright ? 2008 Headstrong Corporation * All rights reserved. * * $Id: HibernateUtil.java * $Revision: * $Author: ViswanathP * $DateTime: Oct 29, 2009 */ import java.sql.Connection; import java.sql.Statement; public class Main { static Connection conn; static Statement stmt; public static void createTable(String query) { try { stmt = conn.createStatement(); stmt.executeUpdate(query); } catch (Exception e) { System.err.println("Got an exception! "); e.printStackTrace(); System.exit(0); } } }