html-flip-book-react 0.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist/flip-book.d.ts +14 -0
  2. package/dist/flip-book.d.ts.map +1 -0
  3. package/dist/flip-book.js +1410 -0
  4. package/dist/flip-book.js.map +1 -0
  5. package/example/.vscode/settings.json +3 -0
  6. package/example/README.md +47 -0
  7. package/example/assets/pages_data/en/assets/cover.jpg +0 -0
  8. package/example/assets/pages_data/en/assets/sql-command.png +0 -0
  9. package/example/assets/pages_data/en/content/000-introduction.md +85 -0
  10. package/example/assets/pages_data/en/content/001-databases.md +39 -0
  11. package/example/assets/pages_data/en/content/002-install-mysql.md +162 -0
  12. package/example/assets/pages_data/en/content/003-creating-tables.md +304 -0
  13. package/example/assets/pages_data/en/content/004-basic-syntax.md +145 -0
  14. package/example/assets/pages_data/en/content/005-select.md +359 -0
  15. package/example/assets/pages_data/en/content/006-where.md +225 -0
  16. package/example/assets/pages_data/en/content/007-order-and-group-by.md +142 -0
  17. package/example/assets/pages_data/en/content/008-insert.md +86 -0
  18. package/example/assets/pages_data/en/content/009-update.md +92 -0
  19. package/example/assets/pages_data/en/content/010-delete.md +28 -0
  20. package/example/assets/pages_data/en/content/011-join.md +297 -0
  21. package/example/assets/pages_data/en/content/012-sql-command-categories.md +121 -0
  22. package/example/assets/pages_data/en/content/013-sub-queries.md +112 -0
  23. package/example/assets/pages_data/en/content/014-unions.md +124 -0
  24. package/example/assets/pages_data/en/content/015-Keys-in-a-Relational Database.md +51 -0
  25. package/example/assets/pages_data/en/content/016-Logical-operator-keywords.md +17 -0
  26. package/example/assets/pages_data/en/content/017-having-clause_aggregate-functions.md +184 -0
  27. package/example/assets/pages_data/en/content/018-essential-mysql-functions.md +190 -0
  28. package/example/assets/pages_data/en/content/019-triggers-in-sql.md +133 -0
  29. package/example/assets/pages_data/en/content/020-TCL-commands.md +154 -0
  30. package/example/assets/pages_data/en/content/021-DCL-commands.md +126 -0
  31. package/example/assets/pages_data/en/content/100-mysqldump.md +109 -0
  32. package/example/assets/pages_data/en/content/101-learn-materialize.md +267 -0
  33. package/example/assets/pages_data/en/content/999-conclusion.md +24 -0
  34. package/example/assets/pages_data/he/4.txt +2 -0
  35. package/example/assets/pages_data/he/5.txt +4 -0
  36. package/example/assets/pages_data/he/6.txt +4 -0
  37. package/example/index.html +21 -0
  38. package/example/package-lock.json +5324 -0
  39. package/example/package.json +39 -0
  40. package/example/src/App.css +52 -0
  41. package/example/src/App.tsx +25 -0
  42. package/example/src/EnBook.tsx +55 -0
  43. package/example/src/HeBook.tsx +44 -0
  44. package/example/src/index.tsx +12 -0
  45. package/example/vite-env.d.ts +1 -0
  46. package/example/vite.config.js +84 -0
  47. package/package.json +45 -0
  48. package/src/FlipBook.tsx +45 -0
  49. package/vite.config.js +66 -0
@@ -0,0 +1,162 @@
1
+ # MySQL
2
+
3
+ Now that you know what a database, table, and column are, the next thing that you would need to do is install a database service where you would be running your SQL queries on.
4
+
5
+ We will be using MySQL as it is free, open-source, and very widely used.
6
+
7
+ ## Installing MySQL
8
+
9
+ Depending on your operating system, to install MySQL run the following commands.
10
+
11
+ ### Install MySQL on Ubuntu
12
+
13
+ To install MySQL on a Linux or Ubuntu machine, run the following commands:
14
+
15
+ * First update your `apt` repository:
16
+
17
+ ```
18
+ sudo apt update -y
19
+ ```
20
+
21
+ * Then install MySQL:
22
+
23
+ ```
24
+ sudo apt install mysql-server mysql-client
25
+ ```
26
+
27
+ We are installing two packages, one is the actual MySQL server, and the other is the MySQL client, which would allow us to connect to the MySQL server and run our queries.
28
+
29
+ To check if MySQL is running, run the following command:
30
+
31
+ ```
32
+ sudo systemctl status mysql.service
33
+ ```
34
+ To secure your MySQL server, you could run the following command:
35
+
36
+ ```
37
+ sudo mysql_secure_installation
38
+ ```
39
+
40
+ Then follow the prompt and choose a secure password and save it in a secure place like a password manager.
41
+
42
+ With that, you would have MySQL installed on your Ubuntu server. The above should also work just fine on Debian.
43
+
44
+ ### Install MySQL on Mac
45
+
46
+ I would recommend installing MySQL using [Homebrew]():
47
+
48
+ ```
49
+ brew install mysql
50
+ ```
51
+
52
+ After that, start MySQL:
53
+
54
+ ```
55
+ brew services start mysql
56
+ ```
57
+
58
+ And finally, secure it:
59
+
60
+ ```
61
+ mysql_secure_installation
62
+ ```
63
+
64
+ In case that you ever need to stop the MySQL service, you could do so with the following command:
65
+
66
+ ```
67
+ brew services stop mysql
68
+ ```
69
+
70
+ ### Install MySQL on Windows
71
+
72
+ To install MySQL on Windows, I would recommend following the steps from the official documentation here:
73
+
74
+ [https://dev.mysql.com/doc/refman/8.0/en/windows-installation.html](https://dev.mysql.com/doc/refman/8.0/en/windows-installation.html)
75
+
76
+ ## Accessing MySQL via CLI
77
+
78
+ To access MySQL run the `mysql` command followed by your user:
79
+
80
+ ```
81
+ mysql -u root -p
82
+ ```
83
+
84
+ ## Creating a database
85
+
86
+ After that, switch to the `demo` database that we created in the previous chapter:
87
+
88
+ ```sql
89
+ USE demo;
90
+ ```
91
+
92
+ To exit the just type the following:
93
+
94
+ ```
95
+ exit;
96
+ ```
97
+
98
+ ## Configuring `.my.cnf`
99
+
100
+ By configuring the `~/.my.cnf` file in your user's home directory, MySQL would allow you to log in without prompting you for a password.
101
+
102
+ To make that change, what you need to do is first create a `.my.cnf` file in your user's home directory:
103
+
104
+ ```
105
+ touch ~/.my.cnf
106
+ ```
107
+
108
+ After that, set secure permissions so that other regular users could not read the file:
109
+
110
+ ```
111
+ chmod 600 ~/.my.cnf
112
+ ```
113
+
114
+ Then using your favourite text editor, open the file:
115
+
116
+ ```
117
+ nano ~/.my.cnf
118
+ ```
119
+
120
+ And add the following configuration:
121
+
122
+ ```
123
+ [client]
124
+ user=YOUR_MYSQL_USERNAME
125
+ password=YOUR_MYSQL_PASSWORD
126
+ ```
127
+
128
+ Make sure to update your MySQL credentials accordingly, then save the file and exit.
129
+
130
+ After that, if you run just `mysql`, you will be authenticated directly with the credentials that you've specified in the `~/.my.cnf` file without being prompted for a password.
131
+
132
+ ## The mysqladmin command
133
+
134
+ As a quick test, you could check all of your open SQL connections by running the following command:
135
+
136
+ ```
137
+ mysqladmin proc
138
+ ```
139
+
140
+ The `mysqladmin` tool would also use the client details from the `~/.my.cnf` file, and it would list your current MySQL process list.
141
+
142
+ Another cool thing that you could try doing is combining this with the `watch` command and kind of monitor your MySQL connections in almost real-time:
143
+
144
+ ```
145
+ watch -n1 mysqladmin proc
146
+ ```
147
+
148
+ To stop the `watch` command, just hit `CTRL+C`
149
+
150
+ ## GUI clients
151
+
152
+ If you prefer using GUI clients, you could take a look a the following ones and install them locally on your laptop:
153
+
154
+ * [MySQL Workbench](https://www.mysql.com/products/workbench/)
155
+ * [Sequel Pro](https://www.sequelpro.com/)
156
+ * [TablePlus](https://tableplus.com/)
157
+
158
+ This will allow you to connect to your database via a graphical interface rather than the `mysql` command-line tool.
159
+
160
+ If you want to have a production-ready MySQL database, I would recommend giving DigitalOcean a try:
161
+
162
+ [Worry-free managed database hosting](https://www.digitalocean.com/products/managed-databases/)
@@ -0,0 +1,304 @@
1
+ # Tables
2
+
3
+ Before we get started with SQL, let's learn how to create tables and columns.
4
+
5
+ As an example, we are going to create a `users` table with the following columns:
6
+
7
+ * `id` - this is going to be the primary key of the table and would be the unique identifier of each user.
8
+ * `username` - this column would hold the username of our users.
9
+ * `name` - here, we will store the full name of users.
10
+ * `status` - here, we will store the status of a user, which would indicate if a user is active or not.
11
+
12
+ You need to specify the data type of each column.
13
+
14
+ In our case it would be like this:
15
+
16
+ * `id` - Integer
17
+ * `username` - Varchar
18
+ * `name` - Varchar
19
+ * `status` - Number
20
+
21
+ ## Data types
22
+
23
+ The most common data types that you would come across are:
24
+
25
+ * `CHAR`(size): Fixed-length character string with a maximum length of 255 bytes.
26
+ * `VARCHAR`(size): Variable-length character string. Max size is specified in parenthesis.
27
+ * `TEXT`(size): A string with a maximum length of 65,535 bytes.
28
+ * `INTEGER`(size) or `INT`(size): A medium integer.
29
+ * `BOOLEAN` or `BOOL`: Holds a true or false value.
30
+ * `DATE`: Holds a date.
31
+
32
+ Let's have the following users table as an example:
33
+
34
+ * `id`: We would want to set the ID to `INT`.
35
+ * `name`: The name should fit in a `VARCHAR` column.
36
+ * `about`: As the about section could be longer, we could set the column data type to `TEXT`.
37
+ * `birthday`: For the birthday column of the user, we could use `DATE`.
38
+
39
+ For more information on all data types available, make sure to check out the official documentation [here](https://dev.mysql.com/doc/refman/8.0/en/data-types.html).
40
+
41
+ ## Creating a database
42
+
43
+ As we briefly covered in the previous chapter, before you could create tables, you would need to create a database by running the following:
44
+
45
+ * First access MySQL:
46
+
47
+ ```
48
+ mysql -u root -p
49
+ ```
50
+
51
+ * Then create a database called `demo_db`:
52
+
53
+ ```sql
54
+ CREATE DATABASE demo_db;
55
+ ```
56
+
57
+ > Note: the database name needs to be unique, if you already have a database named `demo_db` you would receive an error that the database already exists.
58
+
59
+ You can consider this database as the container where we would create all of the tables in.
60
+
61
+ Once you've created the database, you need to switch to that database:
62
+
63
+ ```sql
64
+ USE demo_db;
65
+ ```
66
+
67
+ You can think of this as accessing a directory in Linux with the `cd` command. With `USE`, we switch to a specific database.
68
+
69
+ Alternatively, if you do not want to 'switch' to the specific database, you would need to specify the so-called fully qualified table name. For example, if you had a `users` table in the `demo_db`, and you wanted to select all of the entries from that table, you could use one of the following two approaches:
70
+
71
+ * Switch to the `demo_db` first and then run a select statement:
72
+
73
+ ```sql
74
+ USE demo_db;
75
+ SELECT username FROM users;
76
+ ```
77
+
78
+ * Alternatively, rather than using the `USE` command first, specify the database name followed by the table name separated with a dot: `db_name.table_name`:
79
+
80
+ ```sql
81
+ SELECT username FROM demo_db.users;
82
+ ```
83
+
84
+ We are going to cover the `SELECT` statement more in-depth in the following chapters.
85
+
86
+ ## Creating tables
87
+
88
+ In order to create a table, you need to use the `CREATE TABLE` statement followed by the columns that you want to have in that table and their data type.
89
+
90
+ Let's say that we wanted to create a `users` table with the following columns:
91
+
92
+ * `id`: An integer value
93
+ * `username`: A varchar value
94
+ * `about`: A text type
95
+ * `birthday`: Date
96
+ * `active`: True or false
97
+
98
+ The query that we would need to run to create that table would be:
99
+
100
+ ```sql
101
+ CREATE TABLE users
102
+ (
103
+ id INT,
104
+ username VARCHAR(255),
105
+ about TEXT,
106
+ birthday DATE,
107
+ active BOOL
108
+ );
109
+ ```
110
+
111
+ > Note: You need to select a database first with the `USE` command as mentioned above. Otherwise you will get the following error: `ERROR 1046 (3D000): No database selected.
112
+
113
+ To list the available tables, you could run the following command:
114
+
115
+ ```sql
116
+ SHOW TABLES;
117
+ ```
118
+
119
+ Output:
120
+
121
+ ```
122
+ +-------------------+
123
+ | Tables_in_demo_db |
124
+ +-------------------+
125
+ | users |
126
+ +-------------------+
127
+ ```
128
+
129
+ ### Creating a new table from an existing table
130
+
131
+ You can create a new table from an existing table by using the `CREATE TABLE AS` statement.
132
+
133
+ Let's test that by creating a new table from the table `users` which we created earlier.
134
+
135
+ ```sql
136
+ CREATE TABLE users2 AS
137
+ (
138
+ SELECT * FROM users
139
+ );
140
+
141
+ ```
142
+
143
+ The output that you would get would be:
144
+ ```
145
+ Query OK, 0 rows affected (0.07 sec)
146
+ Records: 0 Duplicates: 0 Warnings: 0
147
+ ```
148
+
149
+ >Note: When creating a table in this way, the new table will be populated with the records from the existing table (based on the SELECT Statement)
150
+
151
+ ## Rename tables
152
+
153
+ You can rename a table by using `ALTER TABLE` statement.
154
+
155
+ Let's change name of user2 table to user3
156
+ ```sql
157
+ ALTER TABLE user2 RENAME TO user3
158
+ ```
159
+
160
+ ## Dropping tables
161
+
162
+ You can drop or delete tables by using the `DROP TABLE` statement.
163
+
164
+ Let's test that and drop the table that we've just created:
165
+
166
+ ```sql
167
+ DROP TABLE users;
168
+ ```
169
+
170
+ The output that you would get would be:
171
+
172
+ ```
173
+ Query OK, 0 rows affected (0.03 sec)
174
+ ```
175
+
176
+ And now, if you were to run the `SHOW TABLES;` query again, you would get the following output:
177
+
178
+ ```
179
+ Empty set (0.00 sec)
180
+ ```
181
+
182
+ ## Allowing NULL values
183
+
184
+ By default, each column in your table can hold NULL values. In case that you don't wanted to allow NULL values for some of the columns in a specific table, you need to specify this during the table creation or later on change the table to allow that.
185
+
186
+ For example, let's say that we want the `username` column to be a required one, we would need to alter the table create statement and include `NOT NULL` right next to the `username` column like this:
187
+
188
+ ```sql
189
+ CREATE TABLE users
190
+ (
191
+ id INT,
192
+ username VARCHAR(255) NOT NULL,
193
+ about TEXT,
194
+ birthday DATE,
195
+ active BOOL
196
+ );
197
+ ```
198
+
199
+ That way, when you try to add a new user, MySQL will let you know that the `username` column is required.
200
+
201
+ ## Specifying a primary key
202
+
203
+ The primary key column, which in our case is the `id` column, is a unique identifier for our users.
204
+
205
+ We want the `id` column to be unique, and also, whenever we add new users, we want the ID of the user to autoincrement for each new user.
206
+
207
+ This can be achieved with a primary key and `AUTO_INCREMENT`. The primary key column needs to be `NOT NULL` as well.
208
+
209
+ If we were to alter the table creation statement, it would look like this:
210
+
211
+ ```sql
212
+ CREATE TABLE users
213
+ (
214
+ id INT PRIMARY KEY AUTO_INCREMENT,
215
+ username VARCHAR(255) NOT NULL,
216
+ about TEXT,
217
+ birthday DATE,
218
+ active BOOL
219
+ );
220
+ ```
221
+
222
+ ## Updating tables
223
+
224
+ In the above example, we created a new table and then dropped it as it was empty. However, in a real-life scenario, this would really be the case.
225
+
226
+ So whenever you need to add or remove a new column from a specific table, you would need to use the `ALTER TABLE` statement.
227
+
228
+ Let's say that we wanted to add an `email` column with type varchar to our `users` table.
229
+
230
+ The syntax would be:
231
+
232
+ ```sql
233
+ ALTER TABLE users ADD email VARCHAR(255);
234
+ ```
235
+
236
+ After that, if you were to describe the table, you would see the new column:
237
+
238
+ ```sql
239
+ DESCRIBE users;
240
+ ```
241
+
242
+ Output:
243
+
244
+ ```
245
+ +----------+--------------+------+-----+---------+
246
+ | Field | Type | Null | Key | Default |
247
+ +----------+--------------+------+-----+---------+
248
+ | id | int | NO | PRI | NULL |
249
+ | username | varchar(255) | NO | | NULL |
250
+ | about | text | YES | | NULL |
251
+ | birthday | date | YES | | NULL |
252
+ | active | tinyint(1) | YES | | NULL |
253
+ | email | varchar(255) | YES | | NULL |
254
+ +----------+--------------+------+-----+---------+
255
+ ```
256
+
257
+ If you wanted to drop a specific column, the syntax would be:
258
+
259
+ ```sql
260
+ ALTER TABLE table_name DROP COLUMN column_name;
261
+ ```
262
+
263
+ > Note: Keep in mind that this is a permanent change, and if you have any critical data in the specific column, it would be deleted instantly.
264
+
265
+ You can use the `ALTER TABLE` statement to also change the data type of a specific column. For example, you could change the `about` column from `TEXT` to `LONGTEXT` type, which could hold longer strings.
266
+
267
+ > Note: Important thing to keep in mind is that if a specific table already holds a particular type of data value like an integer, you can't alter it to varchar, for example. Only if the column does not contain any values, then you could make the change.
268
+
269
+
270
+ ## Truncate table
271
+
272
+ The `TRUNCATE TABLE` command is used to **delete all of the data** from an existing table, but not the table itself.
273
+
274
+ * Syntax of Truncate table:
275
+
276
+ ```sql
277
+ TRUNCATE TABLE table_name;
278
+ ```
279
+
280
+ * Example:
281
+
282
+ Consider a Sellers table having the following records:
283
+
284
+ ```
285
+ +----+----------+-----+-----------+----------+
286
+ | ID | NAME |Items| CITY | SALARY |
287
+ +----+----------+-----+-----------+----------+
288
+ | 1 | Shivam | 34 | Ahmedabad | 2000.00 |
289
+ | 2 | Ajay | 22 | Delhi | 4400.00 |
290
+ | 3 | Kaushik | 28 | Kota | 2000.00 |
291
+ | 4 | Chaitali | 25 | Mumbai | 6600.00 |
292
+ | 5 | Hardik | 26 | Bhopal | 8100.00 |
293
+ | 6 | Maria | 23 | MP | 4200.00 |
294
+ | 7 | Muffy | 29 | Indore | 9000.00 |
295
+ +----+----------+-----+-----------+----------+
296
+ ```
297
+
298
+ Following is the example of a Truncate command:
299
+
300
+ ```sql
301
+ TRUNCATE TABLE Sellers;
302
+ ```
303
+
304
+ After that if you do a `COUNT(*)` on that table you would see that the table is completely empty.
@@ -0,0 +1,145 @@
1
+ # Basic Syntax
2
+
3
+ In this chapter, we will go over the basic SQL syntax.
4
+
5
+ SQL statements are basically the 'commands' that you run against a specific database. Through the SQL statements, you are telling MySQL what you want it to do, for example, if you wanted to get the `username` of all of your users stored in the `users` table, you would run the following SQL statement:
6
+
7
+ ```sql
8
+ SELECT username FROM users;
9
+ ```
10
+
11
+ Rundown of the statement:
12
+
13
+ * `SELECT`: First, we specify the `SELECT` keyword, which indicates that we want to select some data from the database. Other popular keywords are: `INSERT`, `UPDATE` and `DELETE`.
14
+ * `username`: Then we specify which column we want to select.
15
+ * `FROM users`: After that, we specify the table that we want to select the data from using the `FROM` keyword.
16
+ * The semicolon `;` is highly recommended to put at the end. Standard SQL syntax requires it, but some "Database Management Systems' (DBMS)" are tolerant about it, but it's not worth the risk.
17
+
18
+ If you run the above statement, you will get no results as the new `users` table that we've just created is empty.
19
+
20
+ > As a good practice, all SQL keywords should be with uppercase, however, it would work just fine if you use lower case as well.
21
+
22
+ Let's go ahead and cover the basic operations next.
23
+
24
+ ## INSERT
25
+
26
+ To add data to your database, you would use the `INSERT` statement.
27
+
28
+ Let's use the table that we created in the last chapter and insert 1 user into our `users` table:
29
+
30
+ ```sql
31
+ INSERT INTO users (username, email, active)
32
+ VALUES ('bobby', 'bobby@bobbyiliev.com', true);
33
+ ```
34
+
35
+ Rundown of the insert statement:
36
+
37
+ * `INSERT INTO`: first, we specify the `INSERT INTO` keyword, which tells MySQL that we want to insert data a table.
38
+ * `users (username, email, active)`: then, we specify the table name `users` and the columns that we want to insert data into.
39
+ * `VALUES`: then, we specify the values that we want to insert in. The order of attributes is the same as in `users (...)`.
40
+
41
+ ## SELECT
42
+
43
+ Once we've inserted that user, let's go ahead and retrieve the information.
44
+
45
+ To retrieve information from your database, you could use the `SELECT` statement:
46
+
47
+ ```sql
48
+ SELECT * FROM users;
49
+ ```
50
+
51
+ Output:
52
+
53
+ ```
54
+ +----+----------+-------+----------+--------+---------------+
55
+ | id | username | about | birthday | active | email |
56
+ +----+----------+-------+----------+--------+---------------+
57
+ | 1 | bobby | NULL | NULL | 1 | bobby@b...com |
58
+ +----+----------+-------+----------+--------+---------------+
59
+ ```
60
+
61
+ We specify `*` right after the `SELECT` keyword, this means that we want to get all of the columns from the `users` table.
62
+
63
+ If we wanted to the only the `username` and the `email` columns instead, we would change the statement to:
64
+
65
+ ```sql
66
+ SELECT username, email FROM users;
67
+ ```
68
+
69
+ This will return all of the users, but as of the time being we have only 1:
70
+
71
+ ```
72
+ +----------+----------------------+
73
+ | username | email |
74
+ +----------+----------------------+
75
+ | bobby | bobby@bobbyiliev.com |
76
+ +----------+----------------------+
77
+ ```
78
+
79
+ ## UPDATE
80
+
81
+ In order to modify data in your database, you could use the `UPDATE` statement.
82
+
83
+ The syntax would look like this:
84
+
85
+ ```sql
86
+ UPDATE users SET username='bobbyiliev' WHERE id=1;
87
+ ```
88
+
89
+ Rundown of the statement:
90
+
91
+ * `UPDATE users`: First, we specify the `UPDATE` keyword followed by the table that we want to update.
92
+ * `SET username='bobbyiliev'`: Then we specify the columns that we want to update and the new value that we want to set.
93
+ * `WHERE id=1`: Finally, by using the `WHERE` clause, we specify which user should be updated. In our case it is the user with ID 1.
94
+
95
+ > NOTE: If we don't specify a `WHERE` clause, all of the entries inside the `users` table would be updated, and all users would have the `username` set to `bobbyiliev`. You need to be careful when you use the `UPDATE` statement without a `WHERE` clause, as every single row will be updated.
96
+
97
+ We are going to cover `WHERE` more in-depth in the next few chapters.
98
+
99
+ ## DELETE
100
+
101
+ As the name suggests, the `DELETE` statement would remove data from your database.
102
+
103
+ The syntax is as follows:
104
+
105
+ ```sql
106
+ DELETE FROM users WHERE id=1;
107
+ ```
108
+
109
+ Similar to the `UPDATE` statement, if you don't specify a `WHERE` clause, all of the entries from the table will be affected, meaning that all of your users will be deleted.
110
+
111
+ ## Comments
112
+
113
+ In case that you are writing a larger SQL script, it might be helpful to add some comments so that later on, when you come back to the script, you would know what each line does.
114
+
115
+ As with all programming languages, you can add comments in SQL as well.
116
+
117
+ There are two types of comments:
118
+
119
+ * Inline comments:
120
+
121
+ To do so, you just need to add `--` before the text that you want to comment out:
122
+
123
+ ```sql
124
+ SELECT * FROM users; -- Get all users
125
+ ```
126
+
127
+ * Multiple-line comments:
128
+
129
+ Similar to some other programming languages in order to comment multiple lines, you could wrap the text in `/*` `*/` as follows:
130
+
131
+ ```sql
132
+ /*
133
+ Get all of the users
134
+ from your database
135
+ */
136
+ SELECT * FROM users;
137
+ ```
138
+
139
+ You could write that in a `.sql` file and then run it later on, or execute the few lines directly.
140
+
141
+ ## Conclusion
142
+
143
+ Those were some of the most common basic SQL statements.
144
+
145
+ In the next chapters, we are going to go over each of the above statements more in-depth.