HCLTech
Talent Ghar Interview Questions and Answers
Q1. How to delete duplicate records
To delete duplicate records, use SQL queries with DISTINCT keyword or create a unique index on the table.
Use SQL queries with DISTINCT keyword to select unique records and insert them into a new table
Create a unique index on the table to prevent duplicate entries in the future
Use DELETE statement with a subquery to remove duplicate records from the table
Q2. Are you okay with 24×7 support
Yes, I am comfortable with 24x7 support as I understand the importance of continuous support in a fast-paced environment.
I am willing to work in shifts to provide round-the-clock support
I have experience working in a similar role with 24x7 support requirements
I understand the importance of timely response and resolution of issues in a 24x7 support setup
Q3. Different types of joins in sql.
Different types of joins in SQL include inner join, left join, right join, and full outer join.
Inner join: Returns rows when there is a match in both tables.
Left join: Returns all rows from the left table and the matched rows from the right table.
Right join: Returns all rows from the right table and the matched rows from the left table.
Full outer join: Returns rows when there is a match in either table.
Q4. Difference between primary and uniq key
Primary key uniquely identifies each record in a table, while a unique key ensures that all values in a column are distinct.
Primary key is a combination of unique and not null constraints
Primary key can only be one per table
Unique key can have multiple per table
Example: Primary key - employee_id, Unique key - email
Q5. Difference between delete and truncate.
Delete removes rows one by one and can be rolled back, while truncate removes all rows at once and cannot be rolled back.
Delete is a DML command, while truncate is a DDL command.
Delete operation is slower as it generates a lot of undo and redo logs, while truncate is faster.
Delete can have a WHERE clause to specify which rows to delete, while truncate removes all rows in a table.
Delete can be rolled back using ROLLBACK command, while truncate cannot be rolled back.
Delete oper...read more
Q6. Find nth highest salart
To find the nth highest salary, we can use a SQL query with the ORDER BY and LIMIT clauses.
Use a SQL query with ORDER BY and LIMIT clauses to sort the salaries in descending order and retrieve the nth highest salary.
For example, to find the 3rd highest salary in a table named 'employees', the query would be: SELECT DISTINCT salary FROM employees ORDER BY salary DESC LIMIT 2, 1
Top Associate Process Manager Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month