Posts

q

Q.01 : Which of the following is not an element among the four P's in Marketing Mix ? A. Palace B. Price C. Promotion D. Product View Answer Answer : A. Palace

Type Declaration Instruction in C

Type Declaration Instruction This instruction is used to declare the type of variables being used in the program. Any variable used in the program must be declared before using it in any statement. The type declaration statement is written at the beginning of main( ) function. Ex.: int bas ; float rs, grosssal ; char name, code ; There are several subtle variations of the type declaration instruction. These are discussed below: While declaring the type of variable we can also initialize it as shown below. int i = 10, j = 25 ; float a = 1.5, b = 1.99 + 2.4 * 1.44 ; The order in which we define the variables is sometimes important sometimes not. For example, int i = 10, j = 25 ; is same as int j = 25, j = 10 ; However, float a = 1.5, b = a + 3.1 ; is alright, but float b = a + 3.1, a = 1.5 ;         is not. This is because here we are trying to use a even before defining it. The following statements would work int a, b, c, d ; a = b = ...

Instructions to write a C program

C Instructions Now that we have written a few programs let us look at the instructions that we used in these programs. There are basically three types of instructions in C: Type Declaration Instruction Arithmetic Instruction Control Instruction The purpose of each of these instructions is given below:       a)       Type declaration instruction To declare the type of variables used in a C program.       b)       Arithmetic instruction To perform arithmetic operations between constants and variables.       c)       Control instruction To control the sequence of execution of various statements in a C program. C programs would usually contain only the type declaration and the arithmetic instructions.

SQL_VARIANT_PROPERTY Function

SQL_VARIANT_PROPERTY (Transact-SQL) This functions returns the base data type and other information about a   sql_variant   value. Syntax SQL_VARIANT_PROPERTY ( expression , property ) Arguments expression Is an expression of type   sql_variant . property Contains the name of the   sql_variant   property for which information is to be provided.   property   is   varchar( 128 ) , and can be any one of the following values. Value Description Base type of sql_variant returned BaseType SQL Server data type, such as: bigint binary char date datetime datetime2 datetimeoffset decimal float int money nchar numeric nvarchar real smalldatetime smallint smallmoney time tinyint uniqueidentifier varbinary varchar sysname NULL = Input is not valid. Precision Number of digits of the numeric base data type: ...

IDENTITY (Function)

Image
IDENTITY (Function) Is used only in a SELECT statement with an INTO table clause to insert an identity column into a new table. Although similar, the IDENTITY function is not the IDENTITY property that is used with CREATE TABLE and ALTER TABLE. Note To create an automatically incrementing number that can be used in multiple tables or that can be called from applications without referencing any table, see Sequence Numbers. Syntax  IDENTITY (data_type [ , seed , increment ] ) AS column_name Arguments data_type Is the data type of the identity column. Valid data types for an identity column are any data types of the integer data type category, except for the bit data type, or decimal data type. seed Is the integer value to be assigned to the first row in the table. Each subsequent row is assigned the next identity value, which is equal to the last IDENTITY value plus the increment value. If neither seed nor increment is specified, both default to 1. increment ...

IDENT_SEED Function

Image
IDENT_SEED  This function returns the original seed value (returned as numeric(@@MAXPRECISION,0)) that was specified when an identity column in a table or a view was created. Changing the current value of an identity column by using DBCC CHECKIDENT does not change the value returned by this function. Syntax  IDENT_SEED ( 'table_or_view' ) Arguments ' table_or_view ' Is an expression that specifies the table or view to check for a identity seed value. table_or_view can be a character string constant enclosed in quotation marks, a variable, a function, or a column name. table_or_view is char, nchar, varchar, or nvarchar . Return Types numeric Exceptions Returns NULL on error or if a caller does not have permission to view the object. In SQL Server, a user can only view the metadata of securables that the user owns or on which the user has been granted permission. This means that metadata-emitting, built-in functions such as IDENT_SEED may return...

IDENT_INCR Funtion

Image
IDENT_INCR Funtion This function returns the increment value (returned as numeric (@@MAXPRECISION,0)) specified during the creation of an identity column in a table or view that has an identity column. Syntax  IDENT_INCR ( 'table_or_view' ) Arguments ' table_or_view ' Is an expression specifying the table or view to check for a valid identity increment value. table_or_view can be a character string constant enclosed in quotation marks, a variable, a function, or a column name. table_or_view is char, nchar, varchar, or nvarchar. Return Types numeric Exceptions Returns NULL on error or if a caller does not have permission to view the object. In SQL Server, a user can only view the metadata of securables that the user owns or on which the user has been granted permission. This means that metadata-emitting, built-in functions such as IDENT_INCR may return NULL if the user does not have any permission on the object. For more information, see Meta...