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,253
| Attempts: 430 | Questions: 10
Please wait...
Question 1 / 10
0 %
0/100
Score 0/100
1. Which SQL command is used to extract data from tables?

Explanation

The SELECT command is used in SQL to extract data from tables. It allows you to specify the columns you want to retrieve and apply filters or conditions to narrow down the results. This command is fundamental in retrieving specific data from a database and is widely used in querying and analyzing data. The other options, EXTRACT and FIND, are not SQL commands used for extracting data from tables.

Submit
Please wait...
About This Quiz
SQL Quizzes & Trivia

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... see moreexecution of stored procedures, essential for database management skills. see less

2. Stored procedures can be execute on remote Adaptive Servers.

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.

Submit
3. Which SQL keyword is used to sort the result set?

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).

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

Explanation

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

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

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.

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

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".

Submit
7. We can define primary key and foreign key on views.

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.

Submit
8. count(*) returns the total number of non-NULL values in the column.

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.

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

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.

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

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.

Submit
View My Results

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
Cancel
  • All
    All (10)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
Which SQL command is used to extract data from tables?
Stored procedures can be execute on remote Adaptive Servers.
Which SQL keyword is used to sort the result set?
The AND operator displays a record if ANY of the conditions listed are...
In Create stored procedure, the Parameter names can be a maximum of 30...
Assume that today's is monday and today's date...
We can define primary key and foreign key on views.
Count(*) returns the total number of non-NULL values in the column.
Which of the following command will be used for execute a Stored...
Assume that today's is monday and today's date...
Alert!

Advertisement