Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.

100 sql queries

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

  • Inicia sesión para ver los comentarios

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

×