Sybase Quiz :: 2

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Nbans
N
Nbans
Community Contributor
Quizzes Created: 4 | Total Attempts: 7,238
| Attempts: 428
SettingsSettings
Please wait...
  • 1/10 Questions

    Which SQL command is used to extract data from tables?

    • EXTRACT
    • SELECT
    • FIND
    • None of above
Please wait...
Software Quizzes & Trivia
About This Quiz

Sybase Quiz :: 2 tests knowledge on SQL commands, sorting results, logical operators, and stored procedures in Sybase. It evaluates understanding of SELECT, ORDER BY, AND operator, and execution of stored procedures, essential for database management skills.


Quiz Preview

  • 2. 

    Which SQL keyword is used to sort the result set?

    • ORDER

    • SORT

    • ORDER BY

    • SORT BY

    Correct Answer
    A. ORDER BY
    Explanation
    The SQL keyword used to sort the result set is "ORDER BY". This keyword is followed by the column or columns that you want to sort the result set by. It arranges the rows in ascending or descending order based on the specified column(s).

    Rate this question:

  • 3. 

    The AND operator displays a record if ANY of the conditions listed are true.

    • True

    • False

    Correct Answer
    A. False
    Explanation
    The AND operator displays a record if ALL of the conditions listed are true, not just any of them.

    Rate this question:

  • 4. 

    Stored procedures can be execute on remote Adaptive Servers.

    • YES

    • NO

    Correct Answer
    A. YES
    Explanation
    Stored procedures can be executed on remote Adaptive Servers. This means that a stored procedure, which is a set of pre-compiled SQL statements, can be run on a different server from where it is stored. This allows for greater flexibility and scalability in managing and executing database operations. By enabling the execution of stored procedures on remote servers, organizations can distribute their workload and resources more effectively, improving overall performance and efficiency.

    Rate this question:

  • 5. 

    In Create stored procedure, the Parameter names can be a maximum of 30 bytes long, including the @ sign.

    • True

    • False

    Correct Answer
    A. True
    Explanation
    In the context of creating a stored procedure, the parameter names can have a maximum length of 30 bytes, which includes the "@" sign. This means that the names assigned to the parameters within the stored procedure cannot exceed this limit. Therefore, the statement is true.

    Rate this question:

  • 6. 

    Which of the following command will be used for execute a Stored procedure? A) exec procedure_name B) execute procedure_name C) procedure_name

    • A and B

    • Only A

    • Only B

    • All A, B and C

    Correct Answer
    A. All A, B and C
    Explanation
    The correct answer is All A, B and C. This is because all three options (A, B, and C) can be used to execute a stored procedure. The "exec" and "execute" keywords are both valid ways to execute a stored procedure in SQL, and in some cases, the procedure name can be executed directly without using any keyword. Therefore, all three options are correct.

    Rate this question:

  • 7. 

    Count(*) returns the total number of non-NULL values in the column.

    • True

    • False

    Correct Answer
    A. False
    Explanation
    The statement is false because count(*) actually returns the total number of rows in a table, regardless of whether the values in the column are NULL or not. If you want to count only the non-NULL values in a column, you should use count(column_name) instead.

    Rate this question:

  • 8. 

    Assume that today's is monday and today's date is 11 apr 2011. Result of the following query: select datename(dw,getdate())

    • 11 apr 2011 monday

    • 11 apr 2011

    • Monday

    • Error

    Correct Answer
    A. Monday
    Explanation
    The query "select datename(dw,getdate())" is asking for the name of the day of the week for the current date. Since today is Monday, the result of the query is "monday".

    Rate this question:

  • 9. 

    Assume that today's is monday and today's date is 11 apr 2011. Result of the following query: select datepart(dw,getdate())

    • Monday

    • Apr

    • 11

    • 2

    Correct Answer
    A. 2
    Explanation
    The query "select datepart(dw,getdate())" is used to retrieve the day of the week for the current date. In this case, the current date is April 11, 2011, which falls on a Monday. The datepart(dw) function returns the day of the week as a number, where Sunday is represented by 1 and Saturday is represented by 7. Therefore, the result of the query is 2, indicating that it is Monday.

    Rate this question:

  • 10. 

    We can define primary key and foreign key on views.

    • True

    • False

    Correct Answer
    A. True
    Explanation
    Primary keys and foreign keys can be defined on tables to establish relationships between them. However, it is not possible to define primary keys and foreign keys directly on views. Views are virtual tables that are generated based on the underlying tables and do not have their own physical storage. Therefore, primary keys and foreign keys can only be defined on the actual tables, not on views.

    Rate this question:

Quiz Review Timeline (Updated): Mar 16, 2023 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 16, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • May 10, 2011
    Quiz Created by
    Nbans
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.