Get table fields properties (fkey, pkey, unique constraints etc.)

get_tbl_info(con = NULL, tbl = NULL)

Arguments

con

connexion object returned by DBI::dbConnect()

tbl

a character name of the table

Value

data.frame with 6 columns:

  • cid: field position

  • name: field name

  • type: field type

  • notnull: is not null constraint apply to this field?

  • dflt_value: field default value

  • pk: is this field a primary key?

Examples

if (FALSE) { # \dontrun{
     get_tbl_info("species")
} # }