Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/akku27-cse/jdbc_practice


https://github.com/akku27-cse/jdbc_practice

Last synced: 3 months ago
JSON representation

Awesome Lists containing this project

README

        

# Jdbc_Practice
##Regiser class

```shell
Class.forname("com.mysqlo.jdbc.Driver");
```
##Dtabase Creation & Connection

```shell
String url="jdbc:mysql://localhost:3306/database_name";
String UserName=root;
Sytring password="Sa******";
Connection con=DriverManager.getConnection(url,username,password);
```

##create Statement & query
```
String q = "CREATE TABLE emp(id INT, name VARCHAR(10))";
Statement stmt = con.createStatement();
```
##Execute
```
stmt.executeUpdate(q);
```
##close
```
con.close();
```