SQLPrimaryKeys

This function returns a list of column names that comprise the primary key for a table

Syntax :

RETCODE SQLPrimaryKeys (hstmt, catalogName, lenCatalogName, schemaName, lenschemaname, tableName);

Arguments :

The arguments for SQLPrimaryKeys are listed in below table.

TypeNameDescription
SQLHSTMThstmtStatement handle.
SQLCHAR*catalogNameCatalog qualifier of a 3 part table name. This must be a NULL pointer or a zero length string.
SQLSMALLINTLenCataloNameLength of catalogName. This must be set to 0.
SQLCHAR*SchemaNameBuffer that might contain a pattern-value to qualify the result set by schema name.
SQLSMALLINTlenschemanameLength of SchemaName
SQLCHAR*tableNameBuffer that might contain a pattern-value to qualify the result set by table name.
SQLSMALLINTlentableNameLength of tableName
Page last modified on September 26, 2009, at 01:52 AM