-
-
-
What are the commands that come in the category of DML in SQL?
DML refers to Data Manipulation Statements. That is used for accessing and modifying values or data present in the database. The commands that come in the category of DML in SQL INSERT SELECT DELETE UPDATE INSERT: This command is used to insert rows into the table. SYNTAX: INSERT INTO tablename VALUES (value,value,….); SELECT: This is used to select...
-
What is meant by deadlock in database?
Transaction is unit of work done. So a database management system will have number of transactions. There may be situations when two or more transactions are put into wait state simultaneously .In this position each would be waiting for the other transaction to get released. Suppose we have two transactions one and two both executing simultaneously. In transaction numbered one we update student table...
-
What are triggers in database? ">
What are triggers in database?
The programmer may like the database o take some action when a database event occurs. In order to achieve the above purpose triggers are defined. The trigger body refers to the code written within the trigger which gets fired and executed when the related database event associated with the trigger occurs. On this situation one may have the question what is the event on the happening of which triggers...
-
What is the use of truncate command?
Truncate command will delete all records and the most important thing to make note of truncate command is since truncate command cannot be rolled back one must make sure to take proper backup of table data before performing the truncate command. Truncate command is thus used to remove all rows from either a table or a cluster. If one wants to use the truncate command in a cluster they can use it only...
-
What are the differences between stored procedures and triggers?
Stored procedures are compiled collection of programs or SQL statements that live in the database. A stored procedure can access and modify data present in many tables. Also a stored procedure is not associated with any particular database object. But triggers are event-driven special procedures which are attached to a specific database object say a table. Stored procedures are not automatically run...
-
-
What is a constructor ?
A constructor is a special member function which will construct an object with user defined values whenever object is created OR A constructor is a special member function which will be called automatically to initialize the data member of a class whenever object is instantiated.