Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/akku27-cse/jdbc_practice
https://github.com/akku27-cse/jdbc_practice
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/akku27-cse/jdbc_practice
- Owner: akku27-cse
- Created: 2024-08-13T06:23:41.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-09-13T21:17:10.000Z (4 months ago)
- Last Synced: 2024-09-15T12:36:28.586Z (4 months ago)
- Language: Java
- Size: 817 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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();
```