Ghostman
Ghostman

Reputation: 6114

Replace/Assign a value in select statement

    select paymentType from paymentAccount


  output
  p
  f

How can i display the output like

  output
  Part
  Full

Upvotes: 0

Views: 2072

Answers (1)

Kangkan
Kangkan

Reputation: 15571

Rewrite like:

select CASE paymentType WHEN 'p' THEN 'Part' WHEN 'f' THEN 'Full' END AS paymentType from paymentAccount

Upvotes: 3

Related Questions