import java.sql.*; public class vito { public static void main(String[] args) { Connection con; Statement st; try { Class.forName("com.mysql.jdbc.Driver"); con=DriverManager.getConnection ("jdbc:mysql://localhost:3306/test","root",""); st=con.createStatement(); st.execute("create table student(roll_no integer,name varchar(20))"); System.out.println("done"); } catch(Exception e) { System.out.println(e); } } }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter