Which part of the following function definition will generate an error?CREATE FUNCTION dbo.Tomorrow ()RETURNS DATETIMEASBEGIN DECLARE @TodaysDate DATETIME SET @TodaysDate = GETDATE() SET @TodaysDate = DATEADD(DD, DATEDIFF(DD, 0, @TodaysDate), 0) RETURN DATEADD(DD, 1, @TodaysDate)ENDGO
SET @TodaysDate = GETDATE()
SET @TodaysDate = DATEADD(DD, DATEDIFF(DD, 0, @TodaysDate), 0)
RETURN DATEADD(DD, 1, @TodaysDate)
No error is generated. The function will be created.
What is a candidate key?
Used to uniquely identify a row
Alias for primary key
Used to identify a column
Alias for foreign key
Can I call a trigger directly called from an application?
True
False
A view is nothing but a ________ table or a stored query
Dymanic
Real
Virtual
Static
To solve this question, the user needs to know about views in database management systems. A view is a virtual table that does not store any data but only displays data from one or more tables in the database.
Based on this information, the correct answer is:
The Answer is: C. Virtual
How can we get the number of records or rows in a table?
Using COUNT
Using NUM
Using NUMBER
Both a and c above
An outer join requires each record in the two joined tables to have a matching record.
How do I find out all databases starting with ‘test to which I have access to?
SHOW DATABASES LIKE ‘%tech%’;
SHOW DATABASES LIKE ‘%tech;
SHOW DATABASES LIKE ‘'tech'%’;
SHOW DATABASES LIKE ‘tech%’;
Can I define multiple unique constraints on a table?
When do we use a HAVING clause?
To limit the output of a query
To limit the output of a query using an aggregate function only
When GROUP by is used
both b and c above
USE keyword is used to select a ___________ .
Table
Column
Database
All the above