Skip to content

Commit b6489be

Browse files
authored
Update README.md
1 parent c48fb46 commit b6489be

1 file changed

Lines changed: 31 additions & 1 deletion

File tree

README.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The best Java query builder/SQL connector.
55
AdvancedSQL is a SQL query builder and/or connector that helps you to generate/modify information on the database without even have to write any line of SQL code, which sometimes is kindof boring and tiring. AdvancedSQL is the best exit for that developers who wants to continue coding without having to write out-of-syntax code (SQL queries) on Java code.
66

77
## Documentation:
8-
Connect to the Database:
8+
**Connect to the Database:**
99
There is no need to create the database manually, AdvancedSQL does it for you.
1010
```java
1111
import advancedsql.*;
@@ -21,6 +21,36 @@ try {
2121
}
2222
```
2323

24+
**Create table:**
25+
```java
26+
import advancedsql.*;
27+
import advancedsql.query.*;
28+
29+
try {
30+
MySQL mySQL = connect();
31+
32+
// Table
33+
ITable table = mySQL.table("users");
34+
35+
// Create table
36+
Create create = table.create();
37+
38+
// Table columns
39+
create.id();
40+
create.string("first_name");
41+
create.string("last_name");
42+
create.string("test");
43+
44+
Boolean result = create.execute();
45+
46+
// Print query string and result.
47+
System.out.println(create);
48+
System.out.println(result);
49+
} catch (SQLException e) {
50+
e.printStackTrace();
51+
}
52+
```
53+
2454
## Licensing information
2555
This project is licensed under LGPL-3.0. Please see the [LICENSE](/LICENSE) file for details.
2656

0 commit comments

Comments
 (0)