ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:dictionary:setcommentsql

setCommentSql

Syntax
string setCommentSql(
  string $tableName,
  string $columnName,
  string $comment
  )

Description

The method setCommentSql() returns a string containing the SQL necessary to set the column comments on a table to the specified value, if the database supports it.

Note that this function is currently only supported on Oracle databases


Usage

/*
* On an Oracle Database
*/
$dict = newDataDictionary($db);
$s = $dict->setColumnSql('mytable','mycolumn','This is a comment');
print $s;
/*
* Prints: COMMENT ON COLUMN mytable.mycolumn IS 'This is a comment';
*/

Notes

  • Support for this method is limited
  • Special rights may be required to execute the returned SQL
  • If not supported, the method returns false
v5/dictionary/setcommentsql.txt · Last modified: 2016/03/21 01:42 by mnewnham