How to Create and Drop Table in Java | Jdbc | Java and MySQL
Programming Guru
How to Create and Drop Table in java. In this Java Jdbc Tutorial we are going to learn about create and drop table in java using jdbc in java and mysql. how to create a table using JDBC application. Before executing the following example, make sure you have the following in place −
To execute the following example you can replace the username and password with your actual user name and password.
Your MySQL is up and running.
Required Steps
The following steps are required to create a new Database using JDBC application −
Import the packages − Requires that you include the packages containing the JDBC classes needed for database programming. Most often, using import java.sql.* will suffice.
Open a connection − Requires using the DriverManager.getConnection() method to create a Connection object, which represents a physical connection with a database server.
Execute a query − Requires using an object of type Statement for building and submitting an SQL statement to create a table in a seleted database.
how to delete a table using JDBC application. Before executing the following example, make sure you have the following in place −
To execute the following example you can replace the username and password with your actual user name and password.
Your MySQL database you are using, is up and running.
NOTE − This is a serious operation and you have to make a firm decision before proceeding to delete a table, because everything you have in your table would be lost. Required Steps
The following steps are required to create a new Database using JDBC application −
Import the packages − Requires that you include the packages containing the JDBC classes needed for database programming. Most often, using import java.sql.* will suffice.
Open a connection − Requires using the DriverManager.getConnection() method to create a Connection object, which represents a physical connection with a database server.
Execute a query − Requires using an object of type Statement for building and submitting an SQL statement to drop a table in a seleted database.
Programming Guru,Guru Programming,programming,gurru,programminggurru,jdbc,jdbc in java,how to create and drop tables in java using jdbc,How to create tables in java jdbc,how to drop table in java jdbc,Java and MySQL,how to create table in java and mysql,using table in java and mysql
#Java #JDBC #JavaandMySQL
Follow my Facebook Page : https://www.facebook.com/105940115222549 Follow me on Instagram : https://www.instagram.com/p/CViUlw2sOMi Follow me on tumblr : http://programming-guru.tumblr.com Follow me on reddit : https://www.reddit.com/u/Programming_guru1?utm_medium=android_app&utm_source=share ... https://www.youtube.com/watch?v=kXOFw97WDGI
23953648 Bytes