SQL Programs Interview Questions

Write SQL Program To Find Second Highest Salary

Write an SQL query to report the second-highest salary from the Employee table. If there is no second-highest salary, the query should report null. SQL schema Create table If Not Exists Employee (id int, salary int) Truncate table Employee insert into Employee (id, salary) values (‘1’, ‘100’) insert into Employee (id, salary) values (‘2’, ‘200’) insert into Employee … Read more

Write SQL Program to Combine Two Tables

Write an SQL query to report the first name, last name, city, and state of each person in the Person table. If the address of a personId is not present in the Address table, the report null instead. Leetcode Write SQL code to Combine Two Tables Return the result table in any order. Table: Person +————-+———+ | Column Name | Type | +————-+———+ | personId … Read more

error: Content is protected !!