SQL server Interview Question ? Part 4

C# basic course click on: https://www.udemy.com/learn-csharp-with-sagar-jaybhay/ 

What are the important SQL elements?

Following are the different type elements:

  1. Identifiers.
  2. Data type.
  3. Constants.
  4. Operators.
  5. Functions.
  6. Clauses.
  7. Expressions.
  8. Queries.
  9. Statements.

What is the difference between Function and Stored Procedure?

  • User defines functions can be used in the SQL statements in the Where or Having or Select section where as Stored Procedures cannot be used in the SQL statements.
  • User Define functions that return tables can be treated as another row set and this can be used in Joins with other tables.

What are the sub sets in SQL?

Following are the SQL sub sets:

  1. DDL (Data Definition Language)
  2. DML (Data Manipulation Language)
  3. DCL (Data Control Language)

Web API 2- .Net Core In depth In 5 Hours click on: https://www.udemy.com/web-api-2-net-core-in-depth-in-5-hrs-with-sagar-jaybhay/

What is sub query?

A sub query returns data that will be used in the main query. Sub query can be defined as a query within another query. You can place the sub query in a where clause, having clause, from clause. The sub query executes firstly and its output is used to complete the query condition for the main query.

Syntax about sub query:

SELECT column_name

FROM table_name

WHERE column_name expression operator

               ( SELECT column_name FROM table_name);

C# basic course click on: https://www.udemy.com/learn-csharp-with-sagar-jaybhay/ 

What is DDL?

DDL stands for Data Definition Language. DDL allows us to create, delete, and alter database objects such as schemas, views, sequences, tables, catalogs, indexes, and aliases.

What is Data Control Language?

DCL or Data Control Language allows us to control access to the database. Data control language commands include a GRANT to allow specific users to perform specified tasks.

What are the primary keys and foreign keys?

Primary keys are the Unique Identity for each row. The primary key must contain unique values and it cannot be null.

A foreign key is a column that references another table column. A foreign key is a method of ensuring data integrity of the relationship between tables.

Web API 2- .Net Core In depth In 5 Hours click on: https://www.udemy.com/web-api-2-net-core-in-depth-in-5-hrs-with-sagar-jaybhay/

What is a Table?

A table is a predefined format of rows and columns that define an entity. Each table provides with the name of a particular object. In a table, column contains a different type of attribute and a row corresponds to a single record.

C# basic course click on: https://www.udemy.com/learn-csharp-with-sagar-jaybhay/ 

What are User Defined Functions?

User-Defined Functions (UDFs) is allowed you defining its own SQL functions that can accept 0 or more parameters and return a single scalar data value.

What are Arithmetic operators in SQL?

There are different types of arithmetic operators in SQL. Following are the arithmetic operators:

  1. Addition (+).
  2. Subtraction (- ).
  3. Multiplication (*).
  4. Division (/).
  5. Modulus (%).

What is an identity?

Identity is a column that automatically generates number type values. Identity is a start and increment value can be set, but the most DBA leave these.

How to select a Database in SQL?

We can select the database in SQL following way?

Use databaseName;

For example

Use testDB;

C# basic course click on: https://www.udemy.com/learn-csharp-with-sagar-jaybhay/ 

Web API 2- .Net Core In depth In 5 Hours click on: https://www.udemy.com/web-api-2-net-core-in-depth-in-5-hrs-with-sagar-jaybhay/

Visit our website: https://www.expertwithsagarjaybhay.com/

sagar jaybhay

One thought on “SQL server Interview Question ? Part 4

  1. It’s the best time to make some plans for the long run and it’s time to be happy. I have read this submit and if I could I wish to recommend you few interesting things or tips. Perhaps you can write subsequent articles regarding this article. I wish to learn even more issues about it!

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top