Skip to content
Advertisement

Tag: database

Avoiding redundancy in database tables sql mysql

I have a question please. I am developing an online mall website. I have an orders table.. I have put the product_id as an attribute in order to know which product is ordered. In the customer’s purchase history page, I need to present all the orders purchased by the customer, including the product title and product image which are not

How to update specific column with values from another table

I have a table called “bug_table” that looks like this: and a table called “bug_revision_table” that looks like this: Now comes the question: How can I modify the timestamp of each id from the first table with the latest/most recent one from the second table? As you can see, each bug_id can have multiple revisions with different timestamps. I’m only

How to create a table address and query it by states?

How can I create a table with following schema: I wrote the above query for creating the table. But I’m not able to link this table to another table for the query shown below and fetch all state names and total of account balance for the users belonging to those states. Answer You should be able to use something like

Advertisement