IT Questions and Answers :)

Thursday, November 21, 2019

Which of the following are built-in functions in Microsoft SQL Server?

Which of the following are built-in functions in Microsoft SQL Server?

  • SUM, AVG, MULT, DIV, MIN
  • SUM, AVG, MIN, MAX, NAME
  • SUM, AVG, MIN, MAX, MULT
  • COUNT, SUM, AVG, MAX, MIN

EXPLANATION

COUNT, SUM, AVG, MAX, and MIN are all built-in functions in SQL.

In SQL a built-in function is a piece for programming that takes zero or more inputs and returns a value.  An example of a built-in functions is ABS(), which when given a value calculates the absolute (non-negative) value of the number.
Some
functions, such as ABS() are used to perform calculations, other such as GETDATE() are used to obtain a system value, such as the current data, or others, like LEFT(), are used to manipulate textual data.
Here is a simple query using the absolute value function.
SELECT Name,
       ABS(500 - ReorderPoint) ReorderPointDeviation
FROM   production.Product
WHERE  ABS(500 - ReorderPoint) > 200
In this query we first calculate the difference between 500 and a product’s reorder point.  The ABS function is then used to return the result as a positive number.
There are several things to note regarding functions.
  1. The inputs to a function are called parameters.  Not all function have parameters, and some functions have more than one.
  2. Parameters are enclosed in parenthesis.
  3. We use functions in the SELECT clause as well as WHERE filter condition. A function can be used anywhere in a SELECT statement that you can use an expression.
  4. Function are reserved words. I would avoid using them as column or table names.  If you do, then expect to qualify your names with brackets [].
As you learn more about functions you soon find they are vital in being able to calculate and manipulate your query results.  We’ll dig deeper into specific functions and their uses in future posts, but before we do so, let’s talk about the type of data a function can return.

Share:

After initial diagnostics and resource assignment, the startup BIOS program checks for secondary storage devices that contain the OS. The list of devices and the order they can be checked is found in the CMOS setup utility called:

After initial diagnostics and resource assignment, the startup BIOS program checks for secondary storage devices that contain the OS. The list of devices and the order they can be checked is found in the CMOS setup utility called:

  • Boot sequence
  • Power-on-self-test
  • Boot record
  • Partition table 
 After initial diagnostics and resource assignment, the startup BIOS program checks for secondary storage devices that contain the OS. The list of devices and the order they can be checked is found in the CMOS setup utility called:

EXPLANATION

The order in which the devices are listed is the order in which your computer will look for operating system information — in other words, the "boot order." With the boot order shown above, BIOS will first try to boot from any devices it considers "hard drives," which usually means the integrated hard drive that's in the computer.

To boot from the Windows disc, the CD-ROM or disc drive must be before the hard drive in the boot sequence. Tip Computers that give an option for a Boot Menu can use the menu to select what boot device to use.

 


Share:

What is the subnet for a class C network?

What is the subnet for a class C network?

  • 0.255.255.255
  • 255.255.255.255
  • 255.255.255.0
  • 255.255.0.255 

What is the subnet for a class C network?

EXPLANATION

If we use the default subnet mask with a Class C network address,
then we already know that three bytes are used to define the network and only one byte is used to define the hosts on each network. The default Class C mask is: 255.255.255.0.

SOURCE

https://support.microsoft.com/en-in/help/164015/understanding-tcp-ip-addressing-and-subnetting-basics
Share:

Wednesday, November 20, 2019

In SQL Server, what is backward recovery?

In SQL Server, what is backward recovery?

  • Switching to an existing copy of the database
  • Applying after-images to the database
  • Applying after-images and before-images to the DB
  • Applying before-images to the database 
In SQL Server, what is backward recovery?

EXPLANATION

Backwards recovery can be thought of as simply restoring the last saved point. Forward recovery is often about starting from the last saved point and then applying transactions that are newer than the save point, i.e. you are now forward of the save point.

Backward Recovery. Backward recovery restores a journaled database to a prior state. Backward processing starts by rolling back updates to a checkpoint (specified by -SINCE or -AFTER) prior to the desired state and replaying database updates forward till the desired state.
 

 

Share:

In SQL Server, what does the transaction log include?

In SQL Server, what does the transaction log include?

  • The after-image of a record
  • The before and after-image of a record
  • The essential data of the record
  • The before-image of a record 
In SQL Server, what does the transaction log include?

EXPLANATION

The simple answer is that a data backup must include some transaction log otherwise the backup isn’t valid. When a database backup is restored, the result must be a transactionally consistent database (i.e. with no uncommitted transactions or structural inconsistencies).

Every SQL Server database has a transaction log that records all transactions and the database modifications made by each transaction.
The transaction log is a critical component of the database. If there is a system failure, you will need that log to bring your database back to a consistent state.

 

Share:

Popular Posts