SQL AZURE

Interview Questions

1.State the differences between HAVING and WHERE clauses.

  • Criteria for Comparison WHERE HAVING
    Row operations have been implemented.
    operations on columns
    A single row was used.
    The grouped or summary row
    Used to retrieve specific data from specified rows based on a criterion.
    Getting all of the data and sorting it according to the conditions
    Functions that combine
    We are unable to have them.
    You’re welcome to them.
    Statements
    SELECT, UPDATE, and DELETE are all valid options.
    It isn’t possible to use it without a SELECT statement.
    clause GROUP BY
    This clause follows the WHERE clause.
    This clause comes before the HAVING clause.

2.What is SQL?

  • SQL stands for ‘Structured Query Language,’ and it is a database query language. SQL is the standard query language used by ANSI for maintaining relational database management systems (RDBMS) and conducting various data manipulation operations on various types of data. It is a database language that is used to create and delete databases, as well as to fetch and edit table rows and a variety of other tasks.

3.What are the subsets of SQL?

  • The main significant subsets of SQL are:
  1. DDL(Data Definition Language)
  2. DML(Data Manipulation Language)
  3. DCL(Data Control Language)
  4. TCL(Transaction Control Language)

4.Explain the different types of SQL commands.

  • Data Definition Language (DDL): DDL is the part of SQL that describes the database’s data structure when it is being built for the first time. It’s mostly used for creating and reorganising database items. The following are DDL commands:
    o Make a table o Change a table o Remove a table
    • Data Manipulation Language (DML): DML is a programming language that is used to manipulate data in a database. In other words, it aids users in retrieving and manipulating data. It’s used to do things like insert data into the database, update data using the update command, and delete data from the database with the delete command.
    • Data Control Language (DCL): DCL is a programming language that is used to control the flow of data.

5.What are the different types of database management systems?

  • There are four types of database management systems:
    • Hierarchical database: A hierarchical database is a tree-like structure that stores data in a hierarchical way. The parent may have multiple children in this database, but each child should have only one parent.
    • Network database: This database is displayed as a graph with many-to-many relationships. Children can have many children in this database.
    • Relational database: A table represents a relational database. The values in the columns and rows are interrelated. Because it is simple to use, it is the most extensively used database.
    • Object-Oriented Database: This database stores data values and processes as objects. All

6.What are the usages of SQL?

  • The following are the operations that can be carried out using a SQL database:
    • establishing new databases
  • • Adding additional information
  • • erasing info that already exists
  • • Maintaining records
  • • Getting the information
  • • Adding and removing tables
  • • Creating views and functions
  • • Changing data types

7. What is a primary key?

  • A primary key is used to uniquely identify all table records. It cannot have NULL values, and it must contain unique values. A table can have only one primary key that consists of single or multiple fields.
  • Now, we will write a query for demonstrating the use of a primary key for the Employee table:
  • //CREATE TABLE Employee (ID int NOT NULL,Employee_name varchar(255) NOT NULL,Employee_designation varchar(255),Employee_Age int,PRIMARY KEY (ID)

8.What is a Unique Key?

  • The key which can accept only the null value and cannot accept the duplicate values is called Unique Key. The role of the unique key is to make sure that each column and row are unique.
  • The syntax will be the same as the Primary key. So, the query using a Unique Key for the Employee table will be:
  • //CREATE TABLE Employee (ID int NOT NULL,Employee_name varchar(255) NOT NULL,Employee_designation varchar(255),Employee_Age int,UNIQUE(ID));

9.What is the difference between Primary key and Unique Key?

  • Both the Primary and Unique keys have unique values, but the Primary key cannot be null, but the Unique key can. There can only be one primary key in a table, however there can be several unique keys.

10.Why do we use the FLOOR function in SQL Server?

  • The FLOOR() function is used to discover the biggest integer value of a given number, which can be equal to or less than the supplied number.

API stands for Application Programming Interface. Talking in technical terms an API is a set of procedures, functions, and other points of access that an application, an operating system, a library, etc., makes available to programmers in order to allow it to interact with other software. An API takes your requests from the device and fetches the response from the server. Today, API is everywhere. We have achieved so much through APIs, it’s hard to count. If you are into computer science or IT industry, there is no escape from APIs. APIs help you fetch a particular response according to the particular request. 

Follow Us on

Contact Us

Upskill & Reskill For Your Future With Our Software Courses

SQL Azure Course in Hyderabad

Contact Info

Open chat
Need Help?
Hello
Can we Help you?