TCS
10+ GMR Hospitality and Retail Interview Questions and Answers
Q1. How do you delete the records in a table
To delete records in a table, use the DELETE statement with the WHERE clause to specify the condition for deletion.
Use the DELETE statement followed by the table name
Add the WHERE clause to specify the condition for deletion
Execute the query to delete the records
Q2. What is a primary key
A primary key is a unique identifier for a record in a database table.
A primary key must be unique and not null.
It ensures the uniqueness and integrity of data in a table.
Primary keys are used to establish relationships between tables.
Examples of primary keys include social security numbers, email addresses, or auto-incremented IDs.
Q3. write fibanocci series code
Code to generate Fibonacci series
Start with 0 and 1 as the first two numbers
Add the previous two numbers to get the next number in the series
Repeat until desired number of terms is reached
Q4. what is a unique key
A unique key is a column or a set of columns in a database table that uniquely identifies each row.
A unique key ensures that no two rows in a table have the same values for the specified column(s).
It is used to enforce data integrity and prevent duplicate entries.
A table can have multiple unique keys, but each unique key can only have one row with a specific set of values.
Unique keys can be used as a reference for relationships between tables.
Q5. What are types of join did you used
Types of joins include inner join, outer join (left, right, full), cross join, self join.
Inner join: returns rows when there is a match in both tables
Outer join: returns all rows from one table and matching rows from the other table
Cross join: returns the Cartesian product of the two tables
Self join: joins a table to itself
Q6. What is joint type of joint
A type of joint where two or more tables are combined based on a related column between them.
Types include INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL JOIN.
Used in SQL queries to retrieve data from multiple tables.
Example: SELECT * FROM table1 INNER JOIN table2 ON table1.id = table2.id;
Q7. What is where clause in SQL
WHERE clause in SQL is used to filter records based on specified conditions.
WHERE clause is used in SELECT, UPDATE, and DELETE statements to filter records.
It follows the FROM clause in a SQL statement.
Conditions in WHERE clause can include comparison operators like =, <>, <, >, etc.
Logical operators such as AND, OR, and NOT can be used to combine multiple conditions.
Example: SELECT * FROM employees WHERE department = 'IT';
Q8. What is progressive testing
Progressive testing is a software testing approach where testing is done incrementally as new features are added.
Testing is done in stages as new features are developed
Each stage builds upon the previous one
Helps in identifying issues early in the development process
Q9. What is SQL server
SQL Server is a relational database management system developed by Microsoft.
Developed by Microsoft
Used for managing relational databases
Supports T-SQL (Transact-SQL) language
Provides tools for data storage, retrieval, and manipulation
Q10. What is the join
Join is a SQL operation used to combine rows from two or more tables based on a related column between them.
Joins are used to retrieve data from multiple tables based on a related column
Common types of joins include INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL JOIN
Example: SELECT * FROM table1 INNER JOIN table2 ON table1.column = table2.column
Q11. Project in SQL developer
A project in SQL developer involves designing, implementing, and maintaining databases for various applications.
Understand project requirements and design database schema accordingly
Write efficient SQL queries to retrieve and manipulate data
Optimize database performance by indexing, normalization, and query tuning
Collaborate with developers and stakeholders to ensure database meets project needs
Q12. Types of sql, explain briefly
Types of SQL include DDL, DML, DCL, and TCL.
DDL (Data Definition Language) - used to define the structure of database objects (CREATE, ALTER, DROP)
DML (Data Manipulation Language) - used to manipulate data in database objects (SELECT, INSERT, UPDATE, DELETE)
DCL (Data Control Language) - used to control access to data (GRANT, REVOKE)
TCL (Transaction Control Language) - used to manage transactions (COMMIT, ROLLBACK)
Q13. explain normalization in sql
Normalization in SQL is the process of organizing data in a database to reduce redundancy and improve data integrity.
Normalization involves breaking down a database into smaller, more manageable tables.
It helps in reducing data redundancy by storing data in a structured way.
Normalization ensures data integrity by minimizing the chances of inconsistencies.
There are different normal forms like 1NF, 2NF, 3NF, etc. to guide the normalization process.
Q14. explain sql commands
SQL commands are instructions used to interact with a database to perform tasks such as querying, updating, and managing data.
SQL commands are used to interact with databases to perform tasks like querying data, updating data, and managing database structures.
Common SQL commands include SELECT, INSERT, UPDATE, DELETE, CREATE, and DROP.
Examples: SELECT * FROM table_name; INSERT INTO table_name (column1, column2) VALUES (value1, value2); UPDATE table_name SET column1 = value WH...read more
More about working at TCS
Interview Process at GMR Hospitality and Retail
Top SQL Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month