Accenture Sql Developer Interview Questions

3 What is the difference between DROP and TRUNCATE commands?

If a table is dropped, all things associated with that table are dropped as well. This includes the relationships defined on the table with other tables, access privileges, and grants that the table has, as well as the integrity checks and constraints.

To create and use the table again in its original form, all the elements associated with the table need to be redefined.

However, if a table is truncated, there are no such problems as mentioned above. The table retains its original structure.

6 What is the use of the INTERSECT operator?

The INTERSECT operator helps combine two select statements and returns only those records that are common to both the select statements. So, after we get Table A and Table B over here, and if we apply the INTERSECT operator on these two tables, then we will get only those records that are common to the result of the select statements of these two tables.

accenture sql developer interview questions


Now, let us take a look at an example for the INTERSECT operator.


accenture sql developer interview questions


accenture sql developer interview questions

1 What is a primary key?

A primary key is used to uniquely identify all table records. It cannot have NULL values and must contain unique values. Only one primary key can exist in one table, and it may have single or multiple fields, making it a composite key.

Now, we will write a query for demonstrating the use of a primary key for the employee table:

Q What do you understand about stored procedures in T SQL?

Stored procedures in T SQL are collection statements stored within the database. They are prepared T SQL code that you can save and reuse repeatedly. They encapsulate oft-used queries, including conditional statements, loops, and other programming features.Â

Stored procedures hide direct T SQL queries from the code and improve the performance of database operations like deleting, selecting, and updating data. They are similar to functions in high-level programming languages.Â

Q What are the various types of SQL Joins?

Joins in SQL are of the following types:

  • Right Join: It concatenates all rows from the right table and the matching left table rows.
  • Left Join: It concatenates all rows from the left table and the corresponding right table rows.
  • Inner Join: It selects and returns records with matching values in both tables.
  • Full Join: It returns all records of both tables if there is a matching record in either left or the right table.
  • Self Join: It is a regular join, and it simply joins a table to itself. The table is treated similarly to two different tables.
  • Cartesian Join: It is also called a cross join as it returns the rows in the first table by multiplying them with the second table rows.Â
  • Recommended Reading: Top SQL Joins Interview Questions and Answers you should practice.

    5 State the differences between views and tables.

    Views Tables
    A view is a virtual table that is extracted from a database A table is structured with a set number of columns and a boundless number of rows
    A view does not hold data itself A table contains data and stores it in databases
    A view is utilized to query certain information contained in a few distinct tables A table holds fundamental client information and cases of a characterized object
    In a view, we will get frequently queried information In a table, changing the information in the database changes the information that appears in the view

    Accenture SQL Interview Questions | SQL Interview Preparation | Previous not null value |

    Related Posts

    Leave a Reply

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