🎧 New: AI-Generated Podcasts Turn your study notes into engaging audio conversations. Learn more

SQL Query Writing
4 Questions
0 Views

SQL Query Writing

Created by
@MercifulAbundance

Podcast Beta

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What is the correct query to retrieve complete data of employee with ID 7?

  • select * from employee where emp_id=7
  • select * from employee where Eid=7 (correct)
  • select * from employee where EmployeeID=7
  • select * from employee where ID=7
  • Which query correctly displays/retreives the name of employees with salary greater than 2000?

  • select Name from employee where salary>2000
  • select EMPName from employee where salary>=2000 (correct)
  • select EmployeeName from employee where salary>2000
  • select Name from employee where salary>=2000
  • What is the correct query to display/retrieve the average salary in the employee table?

  • select * from employee where salary=average
  • select AVG(salary) as [Average Salary] from employee (correct)
  • select average(salary) from employee
  • select avg_salary from employee
  • Which query correctly retrieves records of employees with salary greater than the average salary of all employees?

    <p>select * from employee where salary&gt;(select AVG(salary) from employee)</p> Signup and view all the answers

    Use Quizgecko on...
    Browser
    Browser