LCASE()

The LCASE() convert the character of string into lowercase.

$sql = “SELECT country_code, LCASE(\’BAHRAIN\’)\n”
. ” FROM `apps_countries`\n”
.”where country_name=\’Bahrain\'”;

Description

The above example converts the BAHRAIN into lower character.

Output

The output of the above program will be:
country_code     LCASE(‘BAHRAIN’)
BH                               bahrain

UCASE()

The UCASE() convert the character of string into uppercase.

$sql = “SELECT UCASE(country_name)\n”
. “FROM apps_countries”;

Description

The above example converts the BAHRAIN into lower character.

Output

UCASE(country_name)

AFGHANISTAN

ALBANIA

ALGERIA

AMERICAN SAMOA

ANDORRA

ANGOLA

ANGUILLA

ANTARCTICA

ANTIGUA AND BARBUDA

ARGENTINA

ARMENIA

ARUBA

AUSTRALIA

AUSTRIA

AZERBAIJAN

BAHAMAS

BAHRAIN

BANGLADESH

BARBADOS

BELARUS

BELGIUM

BELIZE

BENIN

BERMUDA

BHUTAN

BOLIVIA

Advertisements