Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.

100 sql queries

The best SQL queries and highly useful for SQL developers. You can learn and practice so quickly with less effort.

  • Identifiez-vous pour voir les commentaires

100 sql queries

  1. 1. 1000 SQL Queries Srinimf.com
  2. 2. Join Example EMP_NM EMP_JB SELECT nm.id ANSWER +----------+ +--------+ ,nm.name ================ |ID|NAME | |ID|JOB | ,jb.job ID NAME JOB |--|-------| |--|-----| FROM emp_nm nm -- ------- ----- |10|Sanders| |10|Sales| ,emp_jb jb 10 Sanders Sales |20|Pernal | |20|Clerk| WHERE nm.id = jb.id 20 Pernal Clerk |50|Hanes | +--------+ ORDER BY 1; +----------+
  3. 3. Left Outer Join example EMP_NM EMP_JB SELECT nm.id ANSWER +----------+ +--------+ ,nm.name ================ |ID|NAME | |ID|JOB | ,jb.job ID NAME JOB |--|-------| |--|-----| FROM emp_nm nm -- ------- ----- |10|Sanders| |10|Sales| LEFT OUTER JOIN 10 Sanders Sales |20|Pernal | |20|Clerk| emp_jb jb 20 Pernal Clerk |50|Hanes | +--------+ ON nm.id = jb.id 50 Hanes - +----------+ ORDER BY nm.id;
  4. 4. Sub Query Example EMP_NM EMP_JB SELECT * ANSWER +----------+ +--------+ FROM emp_nm nm ======== |ID|NAME | |ID|JOB | WHERE NOT EXISTS ID NAME |--|-------| |--|-----| (SELECT * == ===== |10|Sanders| |10|Sales| FROM emp_jb jb 50 Hanes |20|Pernal | |20|Clerk| WHERE nm.id = jb.id) |50|Hanes | +--------+ ORDER BY id; +----------+
  5. 5. Thank you Download 1000 SQL Queries here Srinimf.com

×