mohammad ali


{ City } bangalore
< Country > india
* Profession * se
User No # 70202
Total Questions Posted # 6
Total Answers Posted # 4

Total Answers Posted for My Questions # 11
Total Views for My Questions # 25625

Users Marked my Answers as Correct # 41
Users Marked my Answers as Wrong # 9
Questions / { mohammad ali }
Questions Answers Category Views Company eMail

Creating Tables Using SELECT

1 SQL Server 2609

How can I create a table from another table without copying any values from the old table?

3 SQL Server 4551

CREATE a table from another table

2 SQL Server 4072

Get Current System Date Time

2 SQL Server 3776

What is a SQL Server Temporary Table?

Wipro,

1 SQL Server 5453

what is the difference between delete,drop and truncate

Honeywell, Zomato,

2 SQL Server 5164




Answers / { mohammad ali }

Question { L&T, 189801 }

Difference between primary key and unique key ?


Answer

-The column holding the primary key constraint cannot accept
null values.whereas colum holding the unique constraint can
accept null values.
-We can declare only one primary key in a table
but a table can have multiple unique key
-Clustered index is created on Primary key constraint and
non clustered unique indexes is created on Unique key constraint.
-Primary key columns automatically become NOT NULL (unique
keys can contain nulls).

Is This Answer Correct ?    1 Yes 2 No

Question { Wipro, 18065 }

can we call stored Procedure in Function in Sql Server 2000
and vice versa.


Answer

We cannot call Procedure from the Function

We can call the Procedure From the Procedure as
EXEC ProcedureName
@Parameter1 = "Para1"
@Parameter2 = "Para2"
@Parameter3 = @Val OUTPUT (Use when there is Output in the Procedure)

Is This Answer Correct ?    6 Yes 1 No


Question { Perot Systems, 15352 }

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

DML

DML is abbreviation of Data Manipulation Language. It is used to retrieve, store, modify, delete, insert and update data in database.

Examples: SELECT, UPDATE, INSERT statements

DDL

DDL is abbreviation of Data Definition Language. It is used to create and modify the structure of database objects in database.

Examples: CREATE, ALTER, DROP statements

DCL

DCL is abbreviation of Data Control Language. It is used to create roles, permissions, and referential integrity as well it is used to control access to database by securing it.

Examples: GRANT, REVOKE statements

TCL

TCL is abbreviation of Transactional Control Language. It is used to manage different transactions occurring within a database.

Examples: COMMIT, ROLLBACK statements

The DELETE command is used to remove rows from a table. A WHERE clause can be used to only remove some rows. If no WHERE condition is specified, all rows will be removed. After performing a DELETE operation you need to
COMMIT or ROLLBACK the transaction to make the change permanent or to undo it.

TRUNCATE removes all rows from a table. The operation cannot be rolled back. As such, TRUCATE is faster and doesn't use as much undo space as a DELETE.

The DROP command removes a table from the database. All the tables' rows,
indexes and privileges will also be removed. The operation cannot be rolled back.

DROP and TRUNCATE are DDL commands, whereas DELETE is a DML command. Therefore DELETE operations can be rolled back (undone), while DROP and TRUNCATE operations cannot be rolled back.

Is This Answer Correct ?    4 Yes 0 No

Question { 29985 }

Define the term DML, DDL and DTL?


Answer

DML

DML is abbreviation of Data Manipulation Language. It is
used to retrieve, store, modify, delete, insert and update
data in database.

Examples: SELECT, UPDATE, INSERT statements

DDL

DDL is abbreviation of Data Definition Language. It is used
to create and modify the structure of database objects in
database.

Examples: CREATE, ALTER, DROP statements

DCL

DCL is abbreviation of Data Control Language. It is used to
create roles, permissions, and referential integrity as well
it is used to control access to database by securing it.

Examples: GRANT, REVOKE statements

TCL

TCL is abbreviation of Transactional Control Language. It is
used to manage different transactions occurring within a
database.

Examples: COMMIT, ROLLBACK statements

Is This Answer Correct ?    30 Yes 6 No