< NULL: Set Keyword   (Previous) Table of Contents (Next)   AS >

NULL: Get Keyword

/**
 * Returns the SQL keyword used in CREATE TABLE statements to indicate
 * a column should allow NULL values
 *
 * @return  string   the query fragment your DBMS needs
 */
function getNullKeyword() {
    return $this->NullKeyword;
}

require 'connect.inc';

$query = 'CREATE TABLE xyz (c CHAR(1) ' . $p->getNullKeyword() . ')';
echo $query;
$db->query($query);
$db->query('DROP TABLE xyz ' . $p->getDropRestrict());
db2
CREATE TABLE xyz (c CHAR(1) )
pgsql
CREATE TABLE xyz (c CHAR(1) NULL )