Which interface in the database/sql package is used to represent a database row?

  • Entity
  • Record
  • Row
  • Tuple
In the database/sql package of Go, the interface used to represent a database row is Row. This interface provides methods to scan column values into Go variables. When executing a SQL query that returns rows, you typically use the QueryRow() method to fetch a single row and then scan its values using the Scan() method of the Row interface. The Row interface abstracts the notion of a database row, making it easy to work with individual rows of query results.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *