SQL Interview Questions together with Answers

SQL Interview Questions as well as Answers

I) Introduction to SQL as well as Database Management Systems

II) SQL Syntax

III) SQL Data Types

IV) SQL Operators

V) SQL Functions

VI) Subsets of SQL

VII) Data definition Language

VIII) Data Manipulation Language

IX) Data Control Language

X) SQL Keys

XI) SQL Select

XII) SQL Simple Queries

XIII) SQL Joins

XIV) SQL Views

XV) Normalization
 Introduction to SQL as well as Database Management Systems SQL Interview Questions as well as Answers
SQL For Database Developers, Testers, as well as Administrators 
1) What is Database?

Database is goose egg but an organized shape of information for slowly access, storing, retrieval as well as managing of data. This is also known every bit structured shape of information which tin last accessed inwards many ways.

Example: School Database, Bank Database, Insurance Database, Hospital Database Etc...

2) What is Table inwards a Database?

A Table is a collection of records of a specific type. For example, employee table, salary tabular array etc.

3) What is Field inwards a Database?

A acre is an surface area inside a tape reserved for a specific slice of data. 

Examples: Employee Name, Employee ID etc.

4) What is Record inwards a Database?

A tape is the collection of values / fields of a specific entity: i.e. an Employee, Salary etc.

5) What is DBMS?

The Database Management System is a collection of programs that enables user to store, retrieve, update as well as delete information from a database.

6) What is RDBMS?

Relational Database Management organization (RDBMS) is a database management organization (DBMS) that is based on the relational model. Data from relational database tin last accessed or reassembled inwards many dissimilar ways without having to reorganize the database tables. Data from relational database tin last accessed using an API, Structured Query Language (SQL).

7) What are the Popular Database Management Systems inwards the information technology Industry?

Oracle, MySQL, Microsoft SQL Server, PostgreSQL, SyBase, MongoDB, DB2, as well as Microsoft Access Etc...

8) What is Oracle RDBMS?

Oracle Database or Oracle RDBMS is an Object Relational Database Management System from the Oracle Corporation.

Oracle database is the showtime database designed for company grid computing. The company grid computing provides the most flexible as well as damage effective means to create create information as well as applications.

9) What is MySQL?

MySQL is a database management organization that allows us to create create relational databases. It is opened upward rootage software backed past times Oracle. Even though MySQL is opened upward rootage software, yous tin purchase a commercial license version from Oracle to acquire a premium back upward services.

10) What is Microsoft SQL Server?

SQL Server is a Relational Database Management System (RDBMS) developed past times Microsoft. 

It is also an ORDBMS, Platform dependent, both GUI as well as ascendency based software as well as SQL Language which is an IBM production (Freeware).

11) What is SQL?

SQL was initially developed at IBM inwards 1970s, It is the criterion linguistic communication to communicate amongst relational database management systems similar Oracle, MS Access, MS SQL Server, MySQL, DB2, Sybase Etc...

12) What are the purposes of SQL?

•  SQL is used to Create New Databases, Create New Tables inwards a Database, Insert records inwards a Database, Update records inwards a Database, Delete records inwards a Database, Retrieve information from a Database, as well as Execute queries against a Database.

•  SQL tin ready Permissions on Tables, Procedures as well as Views. 

•  SQL is used for Database Developers to create as well as manipulate Database Objects.

•  SQL is used for Database Testers to acquit Database Testing.

•  SQL is used for Database Database Administators (DBA) for Database Administration.

13) Who should larn SQL?

i) Database Developers to Design as well as deploy Database Table Structures, Forms, Reports as well as Queries etc...

ii) Database Administrators (DBA) for Keeping Databases upward to appointment as well as managing database access, Writing reports, documentation as well as operating manuals.

iii) Database Testers to Verify Data Integrity, Data Manipulations (Add, Update as well as Delete), as well as Data Comparison.

14) What are the Subsets of SQL?

SQL Commands tin last classified inwards to groups based on their nature, they are,
i) Data definition Language
ii) Data Manipulation Language
iii) Data Control Language

15) What are the Important Commands as well as Operations inwards Data definition Language?

Important Commands as well as Operations inwards Data definition Language

i) Create: To create databases as well as database objects

ii) Alter: To modify existing database objects

iii) Drop: To drib databases as well as databases objects

iv) Truncate: To withdraw all records from a table

v) Rename: To rename database objects

16) What are the Important Commands as well as Operations inwards Data Manipulation Language?

Important Commands as well as Operations inwards Data Manipulation Language

i) Select: To select specific information from a database

ii) Insert: To insert novel records inwards a table

iii) Update: To update existing records 

iv) Delete: To delete existing records from a table

17) What are the Important Commands as well as Operations inwards Data Control Language?

Important Commands as well as Operations inwards Data Control Language

i) Grant: To supply access on the Database objects to the users

ii) Revoke: to withdraw user access rights to the database objects

iii) Deny: To deny permissions to users.

18) What is Index?

An index is functioning tuning method of allowing faster retrieval of records from the table. An index creates an entry for each value as well as it volition last faster to yell upward data.

19) What is View?

The views are virtual tables. Unlike tables that comprise data, views but comprise queries that dynamically yell upward information when used.

20) What is Join? 

Join is a query, which retrieves related columns or rows from multiple tables. 

21) What is Normalization?

Normalization is the physical care for of minimizing redundancy as well as dependency past times organizing fields as well as tabular array of a database. The primary aim of Normalization is to add, delete or modify acre that tin last made inwards a unmarried table.

22) What is Primary key? 

A Primary Key is a type of a constraint enforcing uniqueness as well as information integrity for each row of a table. All columns participating inwards a primary telephone commutation constraint must possess the NOT NULL property.

23) What is Foreign key?

A Foreign telephone commutation is i tabular array which tin last related to the primary telephone commutation of to a greater extent than or less other table. Relationship needs to last created betwixt 2 tables past times referencing unusual telephone commutation amongst the primary telephone commutation of to a greater extent than or less other table.

24) What is Stored procedure?

A Stored Procedure is a component which contains a collection of SQL Queries. The physical care for tin accept inputs, physical care for them as well as post dorsum output.

25) What is Trigger?

When a Database is inserted, deleted or updated, a physical care for is executed inwards reply to that action, such SQL procedures are called every bit Triggers.

Example: When a novel pupil is added to the pupil database, novel records should last created inwards the related tables similar Exam, Score as well as Attendance tables.

26) What is SQL* Plus?

SQL* Plus is a ascendency occupation tool proprietary to Oracle. You tin post SQL queries to the server using the tool. It tin also help yous format the outcome of a query.

27) What is PL/SQL?

PL/SQL stands for procedural linguistic communication extension to SQL. It supports procedural features of programming linguistic communication as well as SQL both. It was developed past times Oracle Corporation inwards early on of 90's to heighten the capabilities of SQL.

28) What is T-SQL?

T-SQL (Transact-SQL) is a ready of programming extensions from Sybase as well as Microsoft that add together several features to the Structured Query Language (SQL). 

29) How to occupation SQL?

We tin occupation SQL Commands inwards whatever Database Management System, Install whatever Database Engine similar Oracle, SQL Server, Sybase, MySQL etc... as well as use.

30 Explain close SQL Syntax?

•  SQL keywords are NOT instance sensitive: select is the same every bit SELECT

•  All the SQL statements start amongst whatever of the keywords similar SELECT, INSERT, UPDATE, DELETE etc...and all the statements halt amongst a semicolon (;), semicolon is the criterion means to dissever SQL Statements.

31) Explain SQL Data Types?

• Influenza A virus subtype H5N1 information type defines what variety of value a column tin contain, nosotros direct maintain to occupation information types spell creating database tables, select a item information type for a tabular array column based on our requirement.

Example:

Character Data Types,
Numeric Data Types,
Date as well as Time Data Types Etc...

Note: Data Types vary from One Database Management System to another

32) What are Operators as well as categories of Operators inwards SQL?

Operators are used to perform Arithmetic, Comparison as well as Logical Operations.

Categories of Operators inwards SQL

1) Arithmetic Operators
2) Comparison Operators
3) Logical Operators
--------------------------------------------------------------------
incomplete

Sumber http://www.gcreddy.com/
Post a Comment (0)
Previous Post Next Post