Difference between revisions of "SQL Notes"

From PeformIQ Upgrade
Jump to navigation Jump to search
(Created page with " =UPDATES from JOINS= <pre> UPDATE Document d, User u SET d.Author_FK = u.User_UD WHERE u.SF_UserId = d.AuthorId; </pre> Category:SQL Category:Database")
 
 
Line 4: Line 4:
<pre>
<pre>
UPDATE Document d, User u SET d.Author_FK = u.User_UD WHERE u.SF_UserId = d.AuthorId;
UPDATE Document d, User u SET d.Author_FK = u.User_UD WHERE u.SF_UserId = d.AuthorId;
</pre>
=Multi Table SELECTs=
<pre>
select d.Author_FK,d.AuthorId,u.Username,u.User_ID  from Document as d, User as u where d.AuthorId = u.SF_UserId;
</pre>
</pre>


[[Category:SQL]]
[[Category:SQL]]
[[Category:Database]]
[[Category:Database]]

Latest revision as of 15:49, 22 May 2017

UPDATES from JOINS

UPDATE Document d, User u SET d.Author_FK = u.User_UD WHERE u.SF_UserId = d.AuthorId;

Multi Table SELECTs

select d.Author_FK,d.AuthorId,u.Username,u.User_ID  from Document as d, User as u where d.AuthorId = u.SF_UserId;