answersLogoWhite

Top Answer
User Avatar
Wiki User
Answered 2010-03-19 16:05:22

The former is for strings, the later is for numbers (integers).

001
๐Ÿ™
0
๐Ÿคจ
0
๐Ÿ˜ฎ
0
๐Ÿ˜‚
0
User Avatar

Your Answer

Related Questions


Char is fixed length, while Varchar is variable length.


The difference between varchar and nvarchardatatypes is that Nvarchar stores UNICODE data. If you have requirements to store UNICODE or multilingual data, nvarcharis your choice. Varchar stores ASCII data and should be your data type of choice for normal use.


That is text where we put only character type value and that is varchar where we put all data type value


There is no difference between int and int32. System.Int32 is a .NET Class and int is an alias name forSystem.Int32.


CREATE TABLE `test`.`users` ( `id` INT NOT NULL auto_increment , `name` VARCHAR( 20 ) NOT NULL , `password` VARCHAR( 20 ) NOT NULL , `email` VARCHAR( 20 ) NOT NULL , PRIMARY KEY ( `id` ) )



Varchar cuts off trailing spaces if given a shorter word than its declared length, while char does not. Char will pad spaces after it if given a shorter word.


Are you sure that these words (normal int and regular int) actually mean something?


CREATE PROCEDURE SP_MENUMASTER_UPDATE( @PARENT_ID INT(3) ,@MENU_NAME VARCHAR(100) ,@UR VARCHAR(100) ,@USR VARCHAR(255) ,@I_D INT(3) ,@ifvalue VARCHAR(50) ) AS BEGIN CASE ifvalue WHEN "newuser" THEN UPDATE MENUMASTER SET USER=USR WHERE ID=I_D; ELSE UPDATE MENUMASTER SET PARENTID=PARENT_ID,MENUNAME=MENU_NAME,URL=UR WHERE ID=I_D; END CASE; END


create table tb (id int primary key, name varchar(10) not null, age int) tb - name of the table


Numberic there is a decimal part. numeric[(p[, s])] which integer does not havefor social security number you can use varchar


The size (and value-range) of int is platform-dependent, whilst that of int32_t is fixed.


Data size and value range: short int: 2 bytes, -32768..32767 int: 4 bytes, -4294967296..4294967295


I will explain in the easiest way the difference between the function and recursive function in C language. Simple Answer is argument of the function is differ but in the recursive function it is same:) Explanation: Function int function(int,int)// function declaration main() { int n; ...... ...... n=function(a,b); } int function(int c,int d) { ...... ...... ...... } recursive Function: int recursive(int,int)// recursive Function declaration main() { int n; ..... ..... ..... ..... n=recursive(a,b); } int recursive(int a,int b) { ..... .... .... .... } Carefully see, In the recursive Function the function arguments are same.


Perhaps an example will help. extern int value; /* declaration */ int value; /* definition */ int value= 20; /* definition with initialization */


Let's look at an example. int a = 1; Here our variable is 'a' which is of type 'int'


A static int (or a static anything) has file scope, and will thus retain its value even if the function in which it is declared goes out of scope.


class MyClass { int memberVariable; public void f() { int localVariable; } }


For the dynamic memory allocation we use New and malloc. Both are used to allocate memory But the major difference between New and Malloc are. 1. New is a operator where as Malloc is a function. 2.In case of Malloc we need to specify the size of memory for our data types. But in case of New we do not need to specify the size. ex. int *a; a=(int*)malloc(sizeof(int)); int *a; a=new int; one more difference is malloc return void* by default ,we need to typecast pointer returned from malloc but in case of new there is no need to typecast ex: int *a; a=(int*)malloc(sizeof(int)); a= new int; arun


actually there is no major difference between the two loops. They are both extremely similar in the way they work. The only difference is the way they are coded - syntax wise. Ex: for(int i=0; i<10; i++) {


Nothing: 'auto' is usable only in functions, and there it is the default storage class, so you don't have to use it at all.


int i=1; while (i<=5) { printf("%d",i); i++; int i=1; do { printf("%2d",i); i++; } while(i<=5);


The word non-function can mean practically anything, a variable, for example.int fun (int x) { return x+10; }int nonfun= 32;


It depends on the programming language, the compiler, and the machine architecture. In C, the size of short int and int is not mandated by the language. Often, on 32-bit machines, 'int' will be 32-bit, while 'short int' may be 16-bit. But the only thing the language promises is that short int will be no larger than int.


no diff between varchar and varchar2 char store only chacter type but varchar2 store variable chacters. also varchar2 shirinks the space if not fully filled but char cant.



Copyright ยฉ 2021 Multiply Media, LLC. All Rights Reserved. The material on this site can not be reproduced, distributed, transmitted, cached or otherwise used, except with prior written permission of Multiply.