SQL Test

Descripción

Basic SQL Test
rahim.ali
Test por rahim.ali, actualizado hace más de 1 año
rahim.ali
Creado por rahim.ali hace más de 8 años
357
1

Resumen del Recurso

Pregunta 1

Pregunta
Which of the following code would grant the role student_admin to a user named william?
Respuesta
  • A - grant student_admin to william;
  • B - grant to william student_admin;
  • C - grant william student_admin;
  • D - None of the above.

Pregunta 2

Pregunta
Select the right query for retrieving records from the tables HONOURS_SUBJECT and LOCATIONS with a right outer join HONOURS_SUBJECT(subject_code, subject_name, department_head); LOCATIONS(subject_code, department_name, location_id, city);
Respuesta
  • A - select h.subject_name, l.department_name, h.department_head, l.city from honours_subject h on right outer join location l where(h.subject_code = l.subject_code);
  • B - select h.subject_name, l.department_name, h.department_head, l.city from honours_subject h outer join location l on(subject_code);
  • C - select h.subject_name, l.department_name, h.department_head, l.city from honours_subject h right outer join location l on(h.subject_code = l.subject_code);
  • D - None of the above.

Pregunta 3

Pregunta
Q - Which of the following code will remove all the rows from the table LOCATIONS?
Respuesta
  • A - DROP TABLE locations;
  • B - DELETE TABLE locations;
  • C - TRUNCATE TABLE locations;
  • D - None of the above.

Pregunta 4

Pregunta
Which of the following is not true about modifying rows in a table?
Respuesta
  • A - Existing rows in a table are modified using the UPDATE statement.
  • B - You can update more than one row at a time.
  • C - All the rows in a table are modified if you omit the WHERE clause.
  • D - None of the above.

Pregunta 5

Pregunta
Consider the following schema − STUDENTS(student_code, first_name, last_name, email, phone_no, date_of_birth, honours_subject, percentage_of_marks); Which of the following query would display the distinct honours subjects in the STUDENTS table?
Respuesta
  • A - select honours_subject from students;
  • B - select distinct honours_subject from students;
  • C - select all honours_subject from students;
  • D - select * from students;

Pregunta 6

Pregunta
Q 12 - Which of the following is not a character manipulation function?
Respuesta
  • A - concat
  • B - substr
  • C - instr
  • D - coalesce

Pregunta 7

Pregunta
Q 14 - Which of the following is true about inserting news rows to a table?
Respuesta
  • A - You must list values in the default order of the columns in the table.
  • B - You can also list the columns in the INSERT clause.
  • C - You can use the INSERT statement to add rows from one table to another.
  • D - All of the above.

Pregunta 8

Pregunta
Given the following data definition, select all queries that return a list of employees who are not managers. TABLE emp id INTEGER NOT NULL PRIMARY KEY mgrId INTEGER REFERENCES emp (id) name VARCHAR(30) NOT NULL
Respuesta
  • A SELECT e.name FROM emp e WHERE e.id NOT IN ( SELECT DISTINCT m.mgrId FROM emp m)
  • B SELECT e.name FROM emp e WHERE e.id NOT IN ( SELECT DISTINCT m.mgrId FROM emp m WHERE m.mgrId IS NOT NULL)
  • C SELECT e.name FROM emp e WHERE e.id NOT IN ( SELECT m.mgrId FROM emp m)
  • D SELECT e.name FROM emp e WHERE e.id NOT IN ( SELECT m.mgrId FROM emp m WHERE m.mgrId IS NOT NULL)

Pregunta 9

Pregunta
9. Which of the follwing statements is/are not true for SQL profiler?
Respuesta
  • enables you to monitor events
  • check if rows are being inserted properly
  • check the performance of a stored procedure
  • ALL answers are correct
Mostrar resumen completo Ocultar resumen completo

Similar

Mind Mapping: 10 Estrategias para Docentes
maya velasquez
Cualidades de la Voz y Variedad Vocal "Expresión Oral"
jairosernabernal
Ecuaciones diferenciales lineales de segundo orden
Juan Beltran
Arte Barroco
juanmadj
Derivadas
erendira.aviles
ESTILOS DE ARQUITECTURA
andres silva a
5 Pasos para el Éxito en el Aprendizaje
maya velasquez
Pasos para la ejecución de un emprendimiento
lamconsultoria
Los Números Enteros
1º, 2º, 3º y 4º de Secundaria
OBLIGACIÓN DE DETENER
juanbanogranell
Aprendizaje Título Preliminar
Test Constitución Española