O'Reilly logo

Go Standard Library Cookbook by Radomir Sohlich

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How it works...

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.

There are four main categories of statements:
  • 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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required