Basic Commands

Asked

Viewed 45 times

-6

Good afternoon.

I’m new to the database and I can’t solve this solution

Assemble a clause that performs UPDATE, for all employees who perform the function "Computer Programmer", changing its function to "Programming Manager"

inserir a descrição da imagem aqui

inserir a descrição da imagem aqui

  • Update YOUR TABLE NAME set COLUMN NAME = "Programming Manager" Where COLUMN NAME = "Computer Programmer";

  • 2

    Welcome! Take the tour and meet Stackoverflow in English.

  • @Joãovitorcastilhogamba It is preferable that you add this information in the question itself rather than spread it by the comments. Just click on [Edit] (just below the question) and add the information. See also this link, that gives tips on how to format the code in the question.

  • @hkotsubo ready is edited.

1 answer

2

Since no information was passed on to the structure of the case, a more "standardized" example to address the doubt would be:

UPDATE funcionario SET funcao = 'Gerente de programação' WHERE funcao = 'Programador de Computador'.

The SETwill assign the desired value in the given field and the WHERE will filter which records will undergo the change according to the informed condition.

  • In the case of two Tables. An Employee call and this one contains the Function column. The other table calls Function and this one has the Function column

  • Could you edit the question or comment on the structure details, such as the names and field types of these tables? So you will be better answered.

  • Is the name of the table like that? With accent and everything? And how is the table of functions?

Browser other questions tagged

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