How can I check in Mysql only the same names of a product table?

0

My Table product is this:

Product table

id  Nombre  precio  stock 
1   Zapato  $45.00  40  
2   Zapato  $23.00  30  
3   Zapato  $23.00  30  
4   jeans   $28.00  10  
5   lentes  $89.00  20  

This is a small table that I can not make a query, where the query only prints the whole row "shoe" only those 3, or just print the row "jean" who could explain thank you.

Something like this:

   "Zapato"
    id  Nombre  precio  stock 
    1   Zapato  $45.00  40  
    2   Zapato  $23.00  30  
    3   Zapato  $23.00  30

    "jean"
    id  Nombre  precio  stock   
    4   jeans   $28.00  10
    
asked by Alex 15.02.2018 в 18:54
source

1 answer

3

If you need to obtain Shoes or Jean in your practice, you must use the WHERE in the following way:

For Shoe

SELECT * FROM producto WHERE Nombre = 'Zapato';

For Jean

SELECT * FROM producto WHERE Nombre = 'Jean';
    
answered by 15.02.2018 в 19:19