Interview Questions

Q:

What is difference between DELETE and TRUNCATE commands?

Answer

Delete command removes the rows from a table based on the condition that we provide with a WHERE clause. Truncate will actually remove all the rows from a table and there will be no data in the table after we run the truncate command.


TRUNCATE:


- TRUNCATE is faster and uses fewer system and transaction log resources than DELETE.


- TRUNCATE removes the data by deallocating the data pages used to store the table's data, and only the page deallocations are recorded in the transaction log.


- TRUNCATE removes all rows from a table, but the table structure, its columns, constraints, indexes and so on, remains. The counter used by an identity for new rows is reset to the seed for the column.


- You cannot use TRUNCATE TABLE on a table referenced by a FOREIGN KEY constraint. Because TRUNCATE TABLE is not logged, it cannot activate a trigger.


- TRUNCATE cannot be rolled back.


- TRUNCATE is DDL Command.


- TRUNCATE Resets identity of the table


DELETE:


- DELETE removes rows one at a time and records an entry in the transaction log for each deleted row.


- If you want to retain the identity counter, use DELETE instead. If you want to remove table definition and its data, use the DROP TABLE statement.


- DELETE Can be used with or without a WHERE clause


- DELETE Activates Triggers.


- DELETE can be rolled back.


- DELETE is DML Command.


- DELETE does not reset identity of the table.


Note: DELETE and TRUNCATE both can be rolled back when surrounded by TRANSACTION if the current session is not closed. If TRUNCATE is written in Query Editor surrounded by TRANSACTION and if session is closed, it can not be rolled back but DELETE can be rolled back.

Report Error

View answer Workspace Report Error Discuss

Subject: SQL

0 2710
Q:

What is advertising?

Answer

Advertising is defined as a paid form of communication that reaches the target audience through mass media to provide product/service and brand related information.  

Report Error

View answer Workspace Report Error Discuss

2 2709
Q:

What is Analysis service repository?

Answer

Every Analysis server has a repository to store metadata for the objects like cubes, data sources etc. It’s by default stored in a MS Access database which can be also migrated to a SQL Server database.

Report Error

View answer Workspace Report Error Discuss

Subject: SQL

0 2708
Q:

Website always has

A) Address B) Information
C) Attachments D) Images
 
Answer & Explanation Answer: A) Address

Explanation:

Website always has an address whether it has images, any information or any attchments in it or not but it must has an address. 

Website_always_has1551876614.jpg image

Report Error

View Answer Report Error Discuss

1 2706
Q:

The primary Economic function of the Financial system is to

A) Providing experts advice to investors and savers B) Match one person's savings with another person's investment
C) Keeping interest rates low D) Match one person's consumpion expenditure with another person's capital expenditure
 
Answer & Explanation Answer: B) Match one person's savings with another person's investment

Explanation:

The primary Economic function of the Financial system is to match one person's savings with another person's investment.

 

The_primary_Economic_function_of_the_Financial_system_is_to1556258311.png image

 

* As a key component of the financial system, banks allocate funds from savers to borrowers in an efficient manner.

* They provide specialized financial services, which reduce the cost of obtaining information about both savings and borrowing opportunities.

* These financial services help to make the overall economy more efficient.

Report Error

View Answer Report Error Discuss

Filed Under: Bank Interview
Exam Prep: CAT , Bank Exams , AIEEE
Job Role: Bank PO , Bank Clerk , Analyst

0 2706
Q:

What is the difference between an unspecified passive open and a fully specified passive open?

Answer

An unspecified passive open has the server waiting for a connection request from a client. A fully specified passive


open has the server waiting for a connection from a specific client.

Report Error

View answer Workspace Report Error Discuss

0 2704
Q:

Explain how to work with Permissions in PHP.

Answer

Permissions in PHP are very similar to UNIX. Each file has three types of permissions – Read, write and execute. Permissions can be changed using the change mode or CHMOD command. CHMOD is followed by 3 digit number specifying the permission type. CHMOD 777 is for Read, Write and execute.


Unnecessary permissions can be stripped off using UNMASK command.


Unmask (777);

Report Error

View answer Workspace Report Error Discuss

Subject: PHP

0 2702
Q:

What is buying forward?

Answer

It is an investment strategy that involves the buying of money market instruments or currencies in anticipation of a price rise or a future increase in demand. Buying forward allows an investor to take advantage of future and potential profits by buying now at alower price, and selling when prices rise.

Report Error

View answer Workspace Report Error Discuss

0 2701