| TECHNICAL
ARTICLES ASP ASP.NET JavaScript Transact SQL Other Articles Software Reviews PHOTO GALLERIES TRAVEL LOG MORE STUFF POPULAR STUFF |
Home > Articles > Transact SQL Programming Articles Changing Case of Strings (Upper and Lower Case)Changing Strings to Lower CaseThe Transact SQL Lower function is used to convert strings to all lower case. For example, the following statement returns a lower case ProductName from the Products table of the Northwind sample database: SELECT LOWER(ProductName) as ProductName FROM Products Changing Strings to Upper CaseThe Transact SQL Upper function is used to convert strings to all upper case (i.e. capitals). For example, the following statement returns an upper case ProductName from the Products table of the Northwind sample database: SELECT UPPER(ProductName) as ProductName FROM Products Changing the Case of Database Table ColumnsIf you need to permanently change the case of text within specific database columns, then a SQL statement like the following can be used: UPDATE Products SET ProductName = UPPER(ProductName) A WHERE clause could also be used if only certain rows needed to be changed. Useful Links
|
| Site Map | Privacy Policy | All content is © 1995 - 2012 Brett B |