Skip to content

Commit

Permalink
content: sql - create table
Browse files Browse the repository at this point in the history
  • Loading branch information
luizchaves committed Sep 9, 2024
1 parent 36e6a6f commit f8baf57
Showing 1 changed file with 31 additions and 3 deletions.
34 changes: 31 additions & 3 deletions src/content/classnotes/database/dbms/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,19 @@ monitor_db> exit
| SQLite | | `sqlite3 database_name.db` | `CREATE TABLE table_name (...);` | `INSERT INTO table_name ...;` |
| MongoDB | `use database_name;` | `use database_name;` | | `db.collection_name.insertOne();` |
Create table MySQL
SQL (CREATE TABLE)
<table>
<thead>
<tr>
<th>Banco de Dados</th>
<th>Comando SQL</th>
</tr>
</thead>
<tbody>
<tr>
<td>MySQL</td>
<td>
```sql
CREATE TABLE hosts (
Expand All @@ -714,7 +726,11 @@ CREATE TABLE hosts (
);
```
Create table Postgres
</td>
</tr>
<tr>
<td>PostgreSQL</td>
<td>
```sql
CREATE TABLE hosts (
Expand All @@ -724,7 +740,11 @@ CREATE TABLE hosts (
);
```
Create table SQLite
</td>
</tr>
<tr>
<td>SQLite</td>
<td>
```sql
CREATE TABLE hosts (
Expand All @@ -734,6 +754,14 @@ CREATE TABLE hosts (
);
```
</td>
</tr>
</tbody>
</table>
## Tipos de Dados
| Types | MySQL | Postgres | SQLite |
Expand Down

0 comments on commit f8baf57

Please sign in to comment.