Home > Software design >  How do I get the Required Output
How do I get the Required Output

Time:10-03

mysql> select * from stores;
 -------- ------------------- ------- ------ ------ ------------ 
| ItemNo | Item              | Scode | Qty  | Rate | LastBuy    |
 -------- ------------------- ------- ------ ------ ------------ 
|   2001 | Classic HB Pencil |    21 |   60 |    6 | 2009-03-10 |
|   2002 | Sharpener         |    22 |   55 |    5 | 2009-03-15 |
|   2003 | Gel Pen           |    21 |  150 |   10 | 2009-03-15 |
|   2004 | Fountain Pen      |    23 |    4 |   45 | 2009-03-05 |
|   2005 | Classic Ball Pen  |    22 |  150 |   10 | 2009-03-16 |
|   2006 | PB Eraser         |    23 |   15 |    5 | 2009-01-05 |
|   2007 | Marker            |    25 |   18 |   30 | 2009-01-25 |
|   2008 | Register          |    24 |   20 |  100 | 2009-11-09 |
 -------- ------------------- ------- ------ ------ ------------ 
8 rows in set (0.02 sec)

Above is the Table on which I am working, i need the output in the form of : The price of ITEM is RATE (ITEM = item name), (RATE = rate of that particular item)

CodePudding user response:

You can try this

SELECT "The price of ", Item," is ", Rate from stores;
  • Related