MSSQL DataTYPE

  💓 Mssql Datatype can have int ,char ,varchar ,decimal ,bit ,money

   1)  Integer :Integer can store whole value like Id, Age  can take 4byte of data to store.              

                 tinyInt :- 1byte ,smallInt: 2byte ,mediumInt : 3 byte,Int :4byte,bigInt :5byte

   2)  Char : Char is a Fixed Length .char can store English character and  Number. Store 1byte of data

   3)  Varchar : Varchar  is a variable Length it store English char and number.

   4)  Decimal :Decimal can store the exact value in database.  decimal(P,D)

                   P = Precision , D = Digit

    5) Bit : Bit can store the value 0 and 1 0 = false ,1 = true.

    6)Money : Money can store the Currencly Value

         Also we have nChar and nVarchar

   nChar : nChar is a fixed length . it can store non-english or localize language like

               Hindi ,Marathi ,Gujrati . it take 2 byte

   nVarchar : nVarchar is variable length . it can store non-english or localize language like

               Hindi ,Marathi ,Gujrati . it take 2 byte

  💀    Different Between Char and Nchar

        Char :   Char is a Fixed Language and  can take English Character and Number .and its 1 byte

         nChar : nChar can take local-language or non-english language like   Hindi ,Marathi ,Gujrati . 

                     it take 2 byte

💀    Different Between Varchar and nVarchar

        Varchar :   Varchar is a Variable Language and can  take English Character and Number .and its 1                             byte

         nVarchar :   Varchar can take local-language or non-english language like  Hindi ,Marathi ,Gujrati                               it take 2 byte .                      

For EG :-

        




Comments

Popular posts from this blog

STORE PROCEDURE AND FUNCTION