Duplicate data

Asked

Viewed 61 times

2

I have a table where customers create the budget and to each product inserted a record is made to separate, but I want to make a query by the name of the customer that the system does not take more than one, but only one. from now Thank you

  • 1

    You can have several with the same name, but want to return only one? Or is it the first on the list? Have you made some code so far and could put together? Or the example of how the tables are?

  • I got it already using DISTINCT

1 answer

2


Uses the distinct. If you specify your conditions better and the bank used would be easier, but it would be something like this:

SELECT DISTINCT(cliente) FROM orcamento
  • SELECT DISTINCT(name) FROM orcamento; was already ??

  • I don’t know, like I said, your question was vague. Talk a little more about the type of BD, the structure of the data and the desired conditions that would become clearer

  • @Lukasalmeidaii if my answer was helpful, remember to mark it as a response. Thank you.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.