Beruflich Dokumente
Kultur Dokumente
table. You select the master database from the tool menu panel.
Write and execute the SQL statement to accomplish this task.
Answer
Q6: Mr. Ali has created a database named DSP_Loans. He has created a view
named DSP_vLoans that executes the following tasks:
Ans: This view is used to join partitioned data horizontally from a set of
member tables across one or more servers. This makes the data appear as if
from one table. A view that joins member tables on the same instance of SQL
Server is a local partitioned view.
Ans: A foreign key constraint is a relation you set to another table. When a
foreign key constraint is created, then you cannot enter any value which is not
available in the reference table.
Q10: You retrieve data from a SQL Server table using a SELECT statement.
The objective is to retrieve the column named Name but you want to change
the columnname to Client Name. What T-SQL keyword must be used?
Q11: You want to create a query that uses a virtual table that contains a partial
subset of an actual table. You do not want to use a view. What will you use?
Ans: CTE
Ans: CTE
Q13: You want to create a query that uses SUM function but the result is
arithmetic overflow. How to resolve this issue?
Ans:
It is easy to view table relationships , constraints, indexes, stored
procedure in database but triggers are difficult to view.
Triggers execute invisible to client-application application. They are not
visible or can be traced in debugging code.
It is hard to follow their logic as it they can be fired before or after the
database insert/update happens.
It is easy to forget about triggers and if there is no documentation it will
be difficult to figure out for new developers for their existence.
Triggers run every time when the database fields are updated and it is
overhead on system. It makes system run slower.
Ans: If you want to force a query to use a specific index, you should use the
TABLE HINT query hint.