Sql Interview Question and Answers
96. |
What is the difference between TRUNCATE and DELETE commands? |
|
TRUNCATE is a DDL command whereas DELETE is a DML command. Hence DELETE operation can be rolled back, but TRUNCATE operation cannot be rolled back. WHERE clause can be used with DELETE and not with TRUNCATE. |
|
|
97. |
Describe the three levels of data abstraction? |
|
There are three levels of abstraction :
- Physical level :
The lowest level of abstraction describes how data are stored. - Logical level:
The next higher level of abstraction, describes what data are stored in database and what relationship among those data. - View level:
The highest level of abstraction describes only part of entire database. |
|
|
98. |
How to copy the tables, schema and views from one SQL server to another? |
|
Microsoft SQL Server 2000 Data Transformation Services (DTS) is a set of graphical tools and programmable objects that lets user extract, transform, and consolidate data from disparate sources into single or multiple destinations. |
|
|
99. |
What is the difference between static and dynamic SQL? |
|
Static SQL is hard-coded in a program when the programmer knows the statements to be executed. Dynamic SQL the program must dynamically allocate memory to receive the query results. |
|
|
100. |
What does COMMIT do? |
|
A Commit makes permanent the changes resulting from all SQL statements in the transaction. The changes made by the SQL statements of a transaction become visible to other user sessions transactions that start only after transaction is committed. |
|
|