SQL Interview Questions and Answers
Are you going to appear in SQL Interview Session and become a Database Administrator? If so, then check SQL Interview Questions and Answers through this article and prepare well.Following SQL Queries Interview Questions and Answers forFreshersare framed by 1 to 5+ years Experienced Programmer.
Candidates can also download the SQL Interview Questions And Answers Pdf which cover basic and advanced topics on Oracle, MS SQL Server and MySQL Database etc.SQL is acronym to Structured Query Language which is used for accessing and manipulating databases.
It is an ANSI standard and also a domain specific semantic, which is used in programming and aimed for managing information held in a RDBMS or RDSMS.Check this page of recruitmentresult.com completely, in order to get complete details about Oracle SQL Interview Questions And Answers, PLSQL Interview Questions And Answers and SQL Query Interview Questions And Answers etc.
Abbreviation Used In This Article:
- RDBMS: Relational Database Management System
- RDSMS: Relational Data Stream Management System
- ANSI: American National Standards Institute
SQL Interview Questions and Answers
The below listed SQL Interview Questions And Answers For Freshers / Experienced are based on following topics such as Record, Table, Transactions, Locks, Normalization, Foreign Key, Primary Key, Constraints, SQL Commands, Pattern Matching, SQL Joins, Views, Stored procedure, Trigger, Cluster & Non cluster Index.
Q1:What is DBMS?
Answer: DBMS is recognized as Database Management System, which is a program that controls creation, maintenance and use of a database. It can be designated as File Manager that manages data in a database rather than saving it in file systems.
Want to Know? DBMS Interview Questions and Answers
Q2: What is RDBMS?
Answer: RDBMS stands for Relational Data Base Management Systems that maintain data records and indices in tables and it may be created and maintained across the data and tables. An RDBMS has the ability to re-join the data items from different files, providing dominant tools for data usage.
Q 3: What is SQL?
Answer: SQL is acronym toStructured Query Language which is designed especially for communicating with databases and it is an ANSI (American National Standards Institute) standard.
Q4: What are the different types of SQL’s statements?
Answer: SQL statements are broadly classified into three categories as shown below. This is one of the most frequently asked SQL Interview Questions And Answers.
Q 5: what is a field in a database?
Answer: A field is an area within a record reserved for a specific piece of data such as Employee Name, Employee ID, etc.
Q6: What is a Record in a database?
Answer: A record is the collection of values / fields of a specific entity such as an Employee, Salary etc.
Q7: What is a Table in a database?
Answer: A table is a collection of records of a specific type, for example, employee table, salary table etc.
Q8: What is a database transaction?
Answer: The term Database transaction takes database from one reliable state to another. At the end of the transaction, the system must be in the former state, if the transaction fails or the status of the system should replicate the successful completion, if the transaction goes through.
Q9: What are properties of a transaction?
Answer: Properties of the transaction can be summarized as ACID Properties such as Atomicity, Consistency, Isolation and Durability.
SQL Queries Interview Questions And Answers
The below listed top 10SQL Query Interview Questions and Answers are based on the following tables, take a look. From below provided link, you can also download SQL Queries Interview Questions And Answers PDF…
Table Name: Employee
|1||John||Abraham||1000000||01-JAN-17 12.00.00 AM||Banking|
|2||Michael||Clarke||800000||01-JAN-17 12.00.00 AM||Insurance|
|3||Roy||Thomas||700000||01-FEB-17 12.00.00 AM||Banking|
|4||Tom||Jose||600000||01-FEB-17 12.00.00 AM||Insurance|
|5||Jerry||Pinto||650000||01-FEB-17 12.00.00 AM||Insurance|
|6||Philip||Mathew||750000||01-JAN-17 12.00.00 AM||Services|
|7||TestName1||123||650000||01-JAN-17 12.00.00 AM||Services|
|8||TestName2||Lname%||600000||01-FEB-17 12.00.00 AM||Insurance|
Table Name: Incentives
Read Also: Interview Preparation Tips
Q 10: How we get all employee details from the employee table?
Answer: Select * from employee
Q 11: How we get Get First_Name,Last_Name from employee table?
Answer: Select first_name, Last_Name from employee
Q12: How to get First_Name from employee table in upper case?
Answer: Select upper(FIRST_NAME) from EMPLOYEE
Q 13: How to get First_Name from employee table in lower case?
Answer: Select lower(FIRST_NAME) from EMPLOYEE
Q14: How to get unique DEPARTMENT from employee table?
Answer: select distinct DEPARTMENT from EMPLOYEE
Q 15: How to get employee details from employee table whose Salary greater than 600000?
Answer: Select * from EMPLOYEE where Salary >600000
Q 16: How to get employee details from employee table whose Salary less than 800000?
Answer: Select * from EMPLOYEE where Salary <800000
Q17: How to get difference between JOINING_DATE and INCENTIVE_DATE from employee and incentives table?
Answer: Select FIRST_NAME,INCENTIVE_DATE – JOINING_DATE from employee a inner join incentives B on A.EMPLOYEE_ID=B.EMPLOYEE_REF_ID
Q18: How to get database date?
Answer: You can get database date by using the following command:
- SQL Queries in Oracle, select sysdate from dual
- SQL Queries in SQL Server, select getdate()
- SQL Query in MySQL, select now()
Read Also: Tips For Dressing When Job-Hunting
Q19: How to get department,total salary with respect to a department from employee table?
Answer: Select DEPARTMENT,sum(SALARY) Total_Salary from employee group by department
Q20: How to get department wise average salary from employee table order by salary ascending?
Answer: select DEPARTMENT,avg(SALARY) AvgSalary from employee group by DEPARTMENT order by AvgSalaryasc
SQL Server Interview Questions And Answers
Q21: How can SQL Server instances be hidden?
Answer: In order to hide a SQL Server instance, we need to make a change in SQL Server Configuration Manager. To do so, launch SQL Server Configuration Manager and do the following: select the instance of SQL Server, right click and select Properties.
After selecting properties, you will just set Hide Instance to “Yes” and click OK or Apply, after the change is made, you have to restart the instance of SQL Server to not expose the name of the instance.
Q22: Can we take backup for Resource DB?
Answer: No, the only way if you want to get a backup by using windows backup for option resource MDF and LDF files.
Check Out: SQL Server Interview Questions And Answers
SQL Joins Interview Questions And Answers
Q23: What is the use of a join in SQL?
Answer: Joins in Structured Query Language can be used for retrieving data from two or more tables into the result set.
Q24: What are the different types of SQL JOIN clauses?
Answer: There are multiple types of JOIN clauses such as INNER JOIN, LEFT JOIN, RIGHT JOIN, FULL JOIN and CROSS JOIN.
PL SQL Interview Questions And Answers
Q25: What is PL/SQL?
Answer: PL/SQL is a technical language that has both interactive Structured Query Language and procedural programming language concepts such as iteration, conditional branching.
Q26: What are the uses of database trigger?
Answer: It is used for the following:
- Audit data modifications.
- Log events transparently.
- Enforce complex business rules.
- Maintain replica tables
- Derive column values
- Implement Complex security authorizations
You May Read This: Interview Preparation Tips for getting a Job
Oracle SQL Interview Questions And Answers
Q27: In which language Oracle has been developed?
Answer: Oracle has been developed using C Language.
Q28: What is RAW datatype?
Answer: RAW datatype is used to hold values in binary data format and maximum size for a raw in a table in 32767 bytes.
SQL Server DBA Interview Questions And Answers
Q29: Why would we use SQL Agent?
Answer: SQL Agent is the job scheduling tool in SQL Server and jobs can be scheduled to run at a set time or when a specific event occurs. It is most often used to schedule managerial jobs such as backups.
Q30: What is DBCC?
Answer: The term DBCC is recognized as Database Console Commands and come in four flavors such as Maintenance, Informational, Validation, and Miscellaneous.
Download From Here: SQL Interview Questions And Answers PDF
We hope above provided SQL Interview Questions and Answers are helpful for you to prepare for SQL Interview session. You can visit our page again to get latest updates regarding the SQL Queries Interview Questions and Answers for 3 Years Experience, SQL DBA Interview Questions And Answers etc.
Students, who have any questions regarding Oracle PL/SQL Interview Questions And Answers and SQL Interview Questions And Answers For Experienced / Fresher, they can leave a comment in the box displayed to you below. Our expert’s team of recruitmentresult.com will try to sort out your problem quickly.
Follow us Social media app such as Google+ / Facebook and get all latest updated aboutSQL Query Interview Questions and Answers PDF and PLSQL Interview Questions And Answers PDF on you timeline wall. Bookmark our web portal and also receive instant updates on your instant access. Thank you.
Something That You Should Put An Eye On
|How to Write Good Resume||Personality Improvement Tips|
|Develop Good Communication Skills||Interview Questions & Answers|
|Phone Interview Tips||Difference Between Resume And CV|
|Interview Preparation Tips To Get Job||Adv. Java Interview Ques & Answers|