sql - How to add a string value to the results in a row -


i'm beginner in sql, , have assingment working on ask's show date , century. although simple thing do, thought adding in string separates result of century, if date shown, , enter string saying "current century -" century result following, , of being in same row. here's code using create table , it's results:

select to_char(current_date, 'month, dd, yyyy cc') "today's date , century" dual; 

it produces this:

today's date , century

february , 05, 2014 21

i can't seem find let me add string results right before, or after century part, can this:

february , 05, 2014 current century - 21st

anybody got ideas on how go doing this, or links can go read how this?

you can that:

select to_char(current_date, 'month, dd, yyyy "current century -" cc"st"') "today's date , century" dual; 

you can insert any text in quotations within format string


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -