Principais perguntas e respostas de entrevista e testes online
Plataforma educacional para preparacao de entrevistas, testes online, tutoriais e pratica ao vivo

Desenvolva habilidades com trilhas de aprendizado focadas, simulados e conteudo pronto para entrevistas.

WithoutBook reune perguntas de entrevista por assunto, testes praticos online, tutoriais e guias comparativos em um unico espaco de aprendizado responsivo.

Preparar entrevista

SQL Query perguntas e respostas de entrevista

Pergunta 31. Explain the purpose of the SQL CASE statement.

The CASE statement is used to perform conditional logic within a SQL query, similar to an IF-THEN-ELSE statement in other programming languages.

Example:

SELECT column1, CASE WHEN condition THEN 'Result1' ELSE 'Result2' END AS NewColumn FROM table;

Isto e util? Adicionar comentario Ver comentarios
 

Pergunta 32. What is a subquery? Provide an example.

A subquery is a query embedded within another query. It can be used to retrieve data that will be used in the main query. Example: SELECT column FROM table WHERE column IN (SELECT column FROM another_table);

Isto e util? Adicionar comentario Ver comentarios
 

Pergunta 33. Explain the difference between CHAR and VARCHAR data types.

CHAR is a fixed-length string data type, while VARCHAR is a variable-length string data type. CHAR pads spaces to the maximum length, while VARCHAR only stores the actual data without padding.

Isto e util? Adicionar comentario Ver comentarios
 

Pergunta 34. Write a SQL query to find the total count of rows in each table of a database.

SELECT table_name, COUNT(*) FROM information_schema.tables GROUP BY table_name;

Isto e util? Adicionar comentario Ver comentarios
 

Pergunta 35. Explain the purpose of the SQL HAVING clause.

The HAVING clause is used to filter the results of aggregate functions in a SELECT statement based on specified conditions.

Example:

SELECT column, COUNT(*) FROM table GROUP BY column HAVING COUNT(*) > 1;

Isto e util? Adicionar comentario Ver comentarios
 

Mais uteis segundo os usuarios:

Copyright © 2026, WithoutBook.