answersLogoWhite

0

If statements and Select-Case statements are two similar features that allow for code branching. The difference is that each If statement may compare against different variables and different ranges, while Select-Case statements may only compare against one variable at a time, and must compare against discrete values. Select-Case is therefore a specialized form of If statements, and are more efficient in terms of amount of code used and execution speed when used instead of theequivalentIf-Else statements.

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

What is the difference between a statement and a clause in SQL?

An SQL statement is a complete set of clauses which returns a value and ends with a semicolon(;) A statement is made up of several clauses Ex: select * from person where f_name='me'; In this ex ' select * from person where f_name='me';' is the statement and select*, from person, where f_name= are the clauses


What is the difference between JOIN and Subquery?

A join will join two or more tables together by a field related to both tables (ie, relationship of primary and foreign keys). It is typically easy to understand. A subquery statement involves a SELECT statement that selects particular values from a table. The values that the select query selects is dependant upon the subquery. The subquery itself is another SELECT statement.


What is the difference between If-else and Switch-case in Java?

The if statement is used to select among two alternatives. It uses a boolean expression todecide which alternative should be executed. The switch statement is used to select among multiple alternatives. It uses an int expression to determine which alternativeshould be executed.


What is Difference between if statement and select case statement in vb.net?

They are both conditional logic statements. The Select Case statement just happens to have a much more clean form when it comes to more than two cases.Example of If..Then...Else:If intVar = 123 ThenmyStr = "123"ElsemyStr = "456"End IfExample of Select Case:Select Case intVarCase 123myStr = "123"Case 456myStr = "456"Case ElsemyStr = "789"End Select


What the difference between select and choose on the computer?

Select is when you pick choices and choose is to pick between choices.


What keyword in an SQL statement's WHERE clause is used to select rows based on a range of values?

BETWEEN For example: SELECT columnName FROM tableName WHERE columnName BETWEEN '1' AND '20'


How do you do a select statement within a select statement in sql?

A memo is a useful tool to provide a record of communication.


What is the major difference between how the Democrats and the Republicans select their delegates to the national convention?

OBAMA =)


What is the difference between executenonquery and executequery?

ExecuteQuery() :To Execute SELECT StatementExecuteNonQuery() :To Execute Other Than Select Statements (INSERT/UPDATE/DELETE)


Select the FALSE statement from below?

A


What is the section of a select case statement that is branched to if none of the case values match the expression listed after the select statement?

The default case.


Sql statement for retrieving data between two dates in SQL Server?

SELECT aFieldName, someOtherFieldName, yetAnotherFieldName FROM aTableName WHERE fieldNameWithDateInIt BETWEEN date1 and date2