Database Developer

  Home  Databases Programming  Database Developer


“Database Developer Frequently Asked Questions in various Database Developer job interviews by interviewer. The set of questions are here to ensures that you offer a perfect answer posed to you. So get preparation for your new job interview”



70 Database Developer Questions And Answers

21⟩ Explain me the SELECT INTO statement?

The SELECT INTO statement copies data from one table into a new table. The new table will be created with the column-names and types as defined in the old table. You can create new column names using the AS clause.

SELECT * INTO newtable FROM oldtable WHERE condition;

 184 views

22⟩ Tell me what is a CHECK constraint?

A CHECK constraint is used to limit the value that is accepted by one or more columns.

E.g. ‘Age’ field should contain only the value greater than 18.

CREATE TABLE EMP_DETAILS(EmpID int NOT NULL, NAME VARCHAR (30) NOT NULL, Age INT CHECK (AGE > 18), PRIMARY KEY (EmpID));

 192 views

23⟩ Tell us what is the difference between Delete, Truncate and Drop command?

The difference between the Delete, Truncate and Drop command is

☛ Delete command is a DML command, it is used to delete rows from a table. It can be rolled back.

☛ Truncate is a DDL command, it is used to delete all the rows from the table and free the space containing the table. It cant be rolled back.

☛ Drop is a DDL command, it removes the complete data along with the table structure(unlike truncate command that removes only the rows). All the tables’ rows, indexes, and privileges will also be removed.

 204 views

24⟩ Tell me when are we going to use truncate and delete?

TRUNCATE is a DDL command, whereas DELETE is a DML command.

We can’t execute a trigger in case of TRUNCATE whilst with DELETE, we can accomplish a trigger.

TRUNCATE is quicker than DELETE, for the reason that when we use DELETE to delete the data, at that time it store the whole statistics in the rollback gap on or after where we can get the data back after removal. In case of TRUNCATE, it will not store data in rollback gap and will unswervingly rub it out. TRUNCATE do not recover the deleted data.

We can use any condition in WHERE clause using DELETE but it is not possible with TRUNCATE.5.If a table is referenced by any foreign key constraints, then TRUNCATE won’t work.

 186 views

25⟩ Tell me what are aggregate functions in SQL?

SQL aggregate functions return a single value, calculated from values in a column. Some of the aggregate functions in SQL are as follows

☛ AVG() – This function returns the average value

☛ COUNT() – This function returns the number of rows

☛ MAX() – This function returns the largest value

☛ MIN() – This function returns the smallest value

☛ ROUND() – This function rounds a numeric field to the number of decimals specified

☛ SUM() – This function returns the sum

 175 views

26⟩ Explain me what do you mean by data integrity?

Data Integrity defines the accuracy as well as the consistency of the data stored in a database. It also defines integrity constraints to enforce business rules on the data when it is entered into an application or a database.

 185 views

27⟩ Do you know SQL Data Types?

In SQL Server, each column in a database table has a name and a data type. We need to decide what type of data to store inside each and every column of a table while creating a SQL table.

 193 views

28⟩ Tell me what is an Index?

An index refers to a performance tuning method of allowing faster retrieval of records from the table. An index creates an entry for each value and hence it will be faster to retrieve data.

 188 views

29⟩ Can you list the different type of joins?

There are various types of joins which are used to retrieve data between the tables. There are four types of joins, namely:

☛ Joins - SQL interview Questions - EdurekaInner join: Inner Join in MySQL is the most common type of join. It is used to return all the rows from multiple tables where the join condition is satisfied.

☛ Left Join: Left Join in MySQL is used to return all the rows from the left table but only the matching rows from the right table where the join condition is fulfilled.

☛ Right Join: Right Join in MySQL is used to return all the rows from the right table but only the matching rows from the left table where the join condition is fulfilled.

☛ Full Join: Full join returns all the records when there is a match in any of the tables. Therefore, it returns all the rows from the left-hand side table and all the rows from the right-hand side table.

 184 views

30⟩ Tell me what is BCP? When is it used?

It is a tool used to duplicate enormous quantity of information from tables and views. It does not facsimile the structures same as foundation to target.

BULK INSERT command helps to bring in a data folder into a record, table or view in a user-specific arrangement.

 201 views

33⟩ Tell us what is a FOREIGN KEY?

A FOREIGN KEY is a key used to link two tables together. A FOREIGN KEY in a table is linked with the PRIMARY KEY of another table.

 192 views

37⟩ Tell me what is Normalization?

Normalization is the process of table design to minimize the data redundancy. There are different types of Noramalization forms in SQL.

☛ First Normal Form

☛ Second Normal Form

☛ Third Normal Form

☛ Boyce and Codd Normal Form

 179 views

39⟩ Tell us what are Constraints?

Constraints are used to specify the limit on the data type of the table. It can be specified while creating or altering the table statement. The sample of constraints are:

☛ NOT NULL

☛ CHECK

☛ DEFAULT

☛ UNIQUE

☛ PRIMARY KEY

☛ FOREIGN KEY

 187 views