Jump to content
Sign in to follow this  
JamesBong

Ajutor SQL

Recommended Posts

Salut

 

Am o problema si nu reusesc sa ii dau de cap.

Am urmatoarele tabele dintr-o baza de date :

HOlNuy8.png

 

Iar ce am de facut este : Write an SQL statement to change any employee’s title. Assume the employee has just phoned in with his/her last name. 

 

Varianta pe care am incercat-o cu un subquerry imi zice ca are syntax error.  

 

Update 'titles' 

set title = 'Senior Engineer'

Where titles.emp_no = (select employees.emp_no

 from employees

Where employees.last_name = 'Kalloufi');

 

Ma poate ajuta cineva ?

Multumesc.

Share this post


Link to post
Share on other sites
23 minutes ago, JamesBong said:

Update 'titles' 

 

De ce pui ' ' la numele tabelului ?

  • Thanks 2
  • Upvote 1

Share this post


Link to post
Share on other sites

Cand incepeti cu" termini cu " cand incepeti cu ' terminati tot cu '

 

Edit// cu alte cuvinte inchideti in pula mea parantezele corespunzator,  tu vezi ce ai acolo?

Edited by .zife
  • Downvote 6

Share this post


Link to post
Share on other sites

Cu ce te droghezi, ma? Cum naiba n-ai luat ban pana acum?

 

ON: @JamesBong De-aia te-am intrebat ce eroare iti da. Invata sa le "citesti" pentru ca te ajuta. Iti spunea destul de clar unde e problema.

Numele de tabel il poti pune doar intre tilde (`), nu apostrof sau ghilimea. (sau fara nimic, evident)

  • Upvote 3

Share this post


Link to post
Share on other sites

I-a face un research, vezi unde lucreaza astia

Edit: daca nu ai citit legislatia, ramai acolo la Altex, si numai consuma

Edited by .zife
  • Downvote 1

Share this post


Link to post
Share on other sites

Pai cum cacat, hai sa publicam toti date personale, nu poti posta doar eroarea?

 

 

Hai ca fac eu niste injectii de nici weleik info n.au vazut si le public aici, e ok?

Edited by .zife
  • Downvote 1

Share this post


Link to post
Share on other sites

Acea bucata de "dummy data" are o inteligenta mai mare ca a ta.

Edited by Raul
  • Upvote 1

Share this post


Link to post
Share on other sites
1 hour ago, .zife said:

Pai cum cacat, hai sa publicam toti date personale, nu poti posta doar eroarea?

 

 

Hai ca fac eu niste injectii de nici weleik info n.au vazut si le public aici, e ok?


Mai bea lapte sa te "prinzi" ca sunt date fictive si probabil e tema de casa a omului. Indiciul consta in:

 

 Iar ce am de facut este : Write an SQL statement to change any employee’s title. Assume the employee has just phoned in with his/her last name.

  • Thanks 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...