SQL Query for custom attributeQuery to return customer order history?Convert SQL Select to Magento SQL querySQL Query to fetch all child SKUs by using the configurable SKUHow to run direct SQL query on magento and bind WHERE IN params?How to find and replace product title using sql queryWritting SQL query to remove product description from database tableMagento 2: Get Product URL and SKU using SQL QuerySQL query kills entire serverSQL Query Newsletter subscription status with custom tablesCustom report from SQL query

Return the Closest Prime Number

Pre-amplifier input protection

Method to test if a number is a perfect power?

How does it work when somebody invests in my business?

Pole-zeros of a real-valued causal FIR system

Class Action - which options I have?

What is the best translation for "slot" in the context of multiplayer video games?

How easy is it to start Magic from scratch?

How can a function with a hole (removable discontinuity) equal a function with no hole?

India just shot down a satellite from the ground. At what altitude range is the resulting debris field?

CREATE opcode: what does it really do?

Unreliable Magic - Is it worth it?

What can we do to stop prior company from asking us questions?

How to safely derail a train during transit?

Crossing the line between justified force and brutality

Why not increase contact surface when reentering the atmosphere?

Is there a korbon needed for conversion?

System.debug(JSON.Serialize(o)) Not longer shows full string

Go Pregnant or Go Home

How to be diplomatic in refusing to write code that breaches the privacy of our users

How does buying out courses with grant money work?

Opposite of a diet

How do I go from 300 unfinished/half written blog posts, to published posts?

Is there a problem with hiding "forgot password" until it's needed?



SQL Query for custom attribute


Query to return customer order history?Convert SQL Select to Magento SQL querySQL Query to fetch all child SKUs by using the configurable SKUHow to run direct SQL query on magento and bind WHERE IN params?How to find and replace product title using sql queryWritting SQL query to remove product description from database tableMagento 2: Get Product URL and SKU using SQL QuerySQL query kills entire serverSQL Query Newsletter subscription status with custom tablesCustom report from SQL query













1















I have create custom attribute in product upc



I want custom query (sql) to get SKUs and UPCs



Can anyone tell me the related tables from where I can get data, or if anyone can share query that would be great.










share|improve this question









New contributor




Muhammad Anas is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
























    1















    I have create custom attribute in product upc



    I want custom query (sql) to get SKUs and UPCs



    Can anyone tell me the related tables from where I can get data, or if anyone can share query that would be great.










    share|improve this question









    New contributor




    Muhammad Anas is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






















      1












      1








      1


      1






      I have create custom attribute in product upc



      I want custom query (sql) to get SKUs and UPCs



      Can anyone tell me the related tables from where I can get data, or if anyone can share query that would be great.










      share|improve this question









      New contributor




      Muhammad Anas is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      I have create custom attribute in product upc



      I want custom query (sql) to get SKUs and UPCs



      Can anyone tell me the related tables from where I can get data, or if anyone can share query that would be great.







      magento2 database attributes sql query






      share|improve this question









      New contributor




      Muhammad Anas is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      Muhammad Anas is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited yesterday









      Muhammad Hasham

      2,7012831




      2,7012831






      New contributor




      Muhammad Anas is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked yesterday









      Muhammad AnasMuhammad Anas

      11211




      11211




      New contributor




      Muhammad Anas is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Muhammad Anas is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Muhammad Anas is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




















          1 Answer
          1






          active

          oldest

          votes


















          2














          Magento uses Eav structure to save the product attribute value.



          First, you have to find out your attribute type of upc.So, you have open eav_attribute and run the below for getting backend_type]




          SELECT attribute_id,backend_type,attribute_code FROM eav_attribute where
          entity_type_id =4 and attribute_code ='upc'




          Suppose, this attribute backend_type is varchar then magento is save the value for products of this attribute at catalog_product_entity_varchar



          Magento is save product lie entity wise like



          Date time type attribute to catalog_product_entity_datetime
          Decimal/Price type attribute to catalog_product_entity_decimal
          Image type attribute to catalog_product_entity_gallery
          Dropdown type attribute to catalog_product_entity_int
          Image type catalog_product_entity_media_gallery
          Image type catalog_product_entity_media_gallery_value
          Image type catalog_product_entity_media_gallery_value_to_entity
          text type attribute catalog_product_entity_text
          tier price catalog_product_entity_tier_price
          Varchar type attribute to catalog_product_entity_varchar


          So, you have to find the appropriate table of this attribute then run below Query like:




          SELECT * FROM catalog_product_entity_varchar where attribute_id
          =(SELECT attribute_id FROM eav_attribute where entity_type_id =4 and attribute_code ='name')




          Here I have done for the name attribute.Fpr your case,you have to change catalog_product_entity_varchar respect to your backend type of attribute.






          share|improve this answer























          • Thanks Amit, this is very helpful

            – Muhammad Anas
            yesterday










          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "479"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );






          Muhammad Anas is a new contributor. Be nice, and check out our Code of Conduct.









          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f267441%2fsql-query-for-custom-attribute%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2














          Magento uses Eav structure to save the product attribute value.



          First, you have to find out your attribute type of upc.So, you have open eav_attribute and run the below for getting backend_type]




          SELECT attribute_id,backend_type,attribute_code FROM eav_attribute where
          entity_type_id =4 and attribute_code ='upc'




          Suppose, this attribute backend_type is varchar then magento is save the value for products of this attribute at catalog_product_entity_varchar



          Magento is save product lie entity wise like



          Date time type attribute to catalog_product_entity_datetime
          Decimal/Price type attribute to catalog_product_entity_decimal
          Image type attribute to catalog_product_entity_gallery
          Dropdown type attribute to catalog_product_entity_int
          Image type catalog_product_entity_media_gallery
          Image type catalog_product_entity_media_gallery_value
          Image type catalog_product_entity_media_gallery_value_to_entity
          text type attribute catalog_product_entity_text
          tier price catalog_product_entity_tier_price
          Varchar type attribute to catalog_product_entity_varchar


          So, you have to find the appropriate table of this attribute then run below Query like:




          SELECT * FROM catalog_product_entity_varchar where attribute_id
          =(SELECT attribute_id FROM eav_attribute where entity_type_id =4 and attribute_code ='name')




          Here I have done for the name attribute.Fpr your case,you have to change catalog_product_entity_varchar respect to your backend type of attribute.






          share|improve this answer























          • Thanks Amit, this is very helpful

            – Muhammad Anas
            yesterday















          2














          Magento uses Eav structure to save the product attribute value.



          First, you have to find out your attribute type of upc.So, you have open eav_attribute and run the below for getting backend_type]




          SELECT attribute_id,backend_type,attribute_code FROM eav_attribute where
          entity_type_id =4 and attribute_code ='upc'




          Suppose, this attribute backend_type is varchar then magento is save the value for products of this attribute at catalog_product_entity_varchar



          Magento is save product lie entity wise like



          Date time type attribute to catalog_product_entity_datetime
          Decimal/Price type attribute to catalog_product_entity_decimal
          Image type attribute to catalog_product_entity_gallery
          Dropdown type attribute to catalog_product_entity_int
          Image type catalog_product_entity_media_gallery
          Image type catalog_product_entity_media_gallery_value
          Image type catalog_product_entity_media_gallery_value_to_entity
          text type attribute catalog_product_entity_text
          tier price catalog_product_entity_tier_price
          Varchar type attribute to catalog_product_entity_varchar


          So, you have to find the appropriate table of this attribute then run below Query like:




          SELECT * FROM catalog_product_entity_varchar where attribute_id
          =(SELECT attribute_id FROM eav_attribute where entity_type_id =4 and attribute_code ='name')




          Here I have done for the name attribute.Fpr your case,you have to change catalog_product_entity_varchar respect to your backend type of attribute.






          share|improve this answer























          • Thanks Amit, this is very helpful

            – Muhammad Anas
            yesterday













          2












          2








          2







          Magento uses Eav structure to save the product attribute value.



          First, you have to find out your attribute type of upc.So, you have open eav_attribute and run the below for getting backend_type]




          SELECT attribute_id,backend_type,attribute_code FROM eav_attribute where
          entity_type_id =4 and attribute_code ='upc'




          Suppose, this attribute backend_type is varchar then magento is save the value for products of this attribute at catalog_product_entity_varchar



          Magento is save product lie entity wise like



          Date time type attribute to catalog_product_entity_datetime
          Decimal/Price type attribute to catalog_product_entity_decimal
          Image type attribute to catalog_product_entity_gallery
          Dropdown type attribute to catalog_product_entity_int
          Image type catalog_product_entity_media_gallery
          Image type catalog_product_entity_media_gallery_value
          Image type catalog_product_entity_media_gallery_value_to_entity
          text type attribute catalog_product_entity_text
          tier price catalog_product_entity_tier_price
          Varchar type attribute to catalog_product_entity_varchar


          So, you have to find the appropriate table of this attribute then run below Query like:




          SELECT * FROM catalog_product_entity_varchar where attribute_id
          =(SELECT attribute_id FROM eav_attribute where entity_type_id =4 and attribute_code ='name')




          Here I have done for the name attribute.Fpr your case,you have to change catalog_product_entity_varchar respect to your backend type of attribute.






          share|improve this answer













          Magento uses Eav structure to save the product attribute value.



          First, you have to find out your attribute type of upc.So, you have open eav_attribute and run the below for getting backend_type]




          SELECT attribute_id,backend_type,attribute_code FROM eav_attribute where
          entity_type_id =4 and attribute_code ='upc'




          Suppose, this attribute backend_type is varchar then magento is save the value for products of this attribute at catalog_product_entity_varchar



          Magento is save product lie entity wise like



          Date time type attribute to catalog_product_entity_datetime
          Decimal/Price type attribute to catalog_product_entity_decimal
          Image type attribute to catalog_product_entity_gallery
          Dropdown type attribute to catalog_product_entity_int
          Image type catalog_product_entity_media_gallery
          Image type catalog_product_entity_media_gallery_value
          Image type catalog_product_entity_media_gallery_value_to_entity
          text type attribute catalog_product_entity_text
          tier price catalog_product_entity_tier_price
          Varchar type attribute to catalog_product_entity_varchar


          So, you have to find the appropriate table of this attribute then run below Query like:




          SELECT * FROM catalog_product_entity_varchar where attribute_id
          =(SELECT attribute_id FROM eav_attribute where entity_type_id =4 and attribute_code ='name')




          Here I have done for the name attribute.Fpr your case,you have to change catalog_product_entity_varchar respect to your backend type of attribute.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered yesterday









          Amit BeraAmit Bera

          59.5k1676177




          59.5k1676177












          • Thanks Amit, this is very helpful

            – Muhammad Anas
            yesterday

















          • Thanks Amit, this is very helpful

            – Muhammad Anas
            yesterday
















          Thanks Amit, this is very helpful

          – Muhammad Anas
          yesterday





          Thanks Amit, this is very helpful

          – Muhammad Anas
          yesterday










          Muhammad Anas is a new contributor. Be nice, and check out our Code of Conduct.









          draft saved

          draft discarded


















          Muhammad Anas is a new contributor. Be nice, and check out our Code of Conduct.












          Muhammad Anas is a new contributor. Be nice, and check out our Code of Conduct.











          Muhammad Anas is a new contributor. Be nice, and check out our Code of Conduct.














          Thanks for contributing an answer to Magento Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f267441%2fsql-query-for-custom-attribute%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Sum ergo cogito? 1 nng

          419 nièngy_Soadمي 19bal1.5o_g

          Queiggey Chernihivv 9NnOo i Zw X QqKk LpB