Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

1. What are the grouping function in SQL ?

2. If base table of a view deleted means, what will happen
while we querying on view ? will give any error ?

3. Difference between DROP, DELETE, TRUNCATE table ?

4. What is constraints and types ?

5. What is max size of nchar & nvarchar ?

6. Define ROLLBACK, COMMIT, SAVE POINT

7. How non-clustered better ? or rank the Clustered,
Non-Clustered and Table scan in performance wise

8. Select 10 rows from a table ?

9. Define DML, DDL, DCL, DTL commands ?

10. What is mean by NULL value ? NULL means "" or 0 or
undefined ?

11. Default constraints ?

12. Can we have more then primary Key in table ?

13. Type of integrity ? Entity, Referential, Domain ?

Answer Posted / srivas

What is the difference between DROP,DELETE,TRUNCATE table ?
Delete:It's an DML command which is used for deleting
particular table in the database...even though we delete the
data we can regain it by rollback command.

Example:SQL> SELECT COUNT(*) FROM emp;

COUNT(*)
----------
14

SQL> DELESQL> SELECT COUNT(*) FROM emp;

COUNT(*)
----------
14

SQL> DELETE FROM emp WHERE job = 'CLERK';

4 rows deleted.

SQL> COMMIT;

Commit complete.

Truncate:This command is a DDL Command which is used to
delete a table...I Just Conclude it as
Truncate=Delete+Commit...once u applied this on table u
can't get the data back...but the structure will be there..

Example:

SQL> TRUNCATE TABLE emp;

Table truncated.

SQL> SELECT COUNT(*) FROM emp;

COUNT(*)
----------
0

Drop:It is used to destroy entire structure of a
table...once we apply this command on any particular table
we can't get it in anyway...so be cautious while applying
this command.

Example:

SQL> DROP TABLE emp;

Table dropped.

SQL> SELECT * FROM emp;
SELECT * FROM emp
*
ERROR at line 1:
ORA-00942: table or view does not exist

Is This Answer Correct ?    11 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Difference between uniqe index and uniqe constraint?

950


How can you fetch alternate records from a table?

945


What do I need to start working with sql studio? : sql server management studio

1091


What is normalization according to you and explain its different levels?

930


What are truncate options available in sql server? : sql server database administration

1003


What is the difference between a unique key and primary key?

929


Does any body please help me what question's have asked for SSRS in the interview?

2129


How to create view in stored procedure sql server?

1003


You have several tables, and they are joined together for querying. The tables contain both clustered indexes and non clustered indexes to optimize performance, how should you distribute the tables and their indexes onto different file groups?

986


Do you know what are the properties of the relational tables?

1012


How you can get the list of largest tables in a database?

992


How can I create a report based on a query? : sql server management studio

999


What are the differences between “row_number()”, “rank()” and “dense_rank()”?

1122


What is dbcc command in sql server?

1067


What is user-defined multi-statement table-valued function?

1038