Generally, there are two types of statements that we can execute against the database. With the first type of statements we do not expect any rows as a result and finally, we get no output or just a number of affected rows. This type of statement is executed by the Exec method on the DB struct pointer. In the preceding sample code, we have the TRUNCATE and INSERT statements. But this way, the DDL and DCL statements could be executed too.
- DDL (Data Definition Language): This language allows you to create and modify the database scheme
- DML (Data Modeling Language): This language helps you to modify the data
- DCL (Data Control Language): This language defines the access control over ...