IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

MS SQL Server Discussion :

[MSSql] Type de données : nvarchar


Sujet :

MS SQL Server

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre confirmé
    Profil pro
    Inscrit en
    Mai 2006
    Messages
    171
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2006
    Messages : 171
    Par défaut [MSSql] Type de données : nvarchar
    Bonjour à tous,

    J'utilise SQL Server Management Studio Express 2005.
    Je voudrais avoir un champ qui contienne un texte saisi par un utilisateur, dont qui puisse contenir au moins 500 caractères.

    J'ai essayé nvarchar(MAX) mais c'est limité à 50 caractères environ !!!
    Je ne suis pas arrivé à trouver le bon type de champ. Quelqu'un aurait-il une idée ??
    Merci bien

  2. #2
    Membre expérimenté
    Inscrit en
    Octobre 2005
    Messages
    344
    Détails du profil
    Informations forums :
    Inscription : Octobre 2005
    Messages : 344
    Par défaut
    voici les types existant, tu pourrais essayer avec ceux en rouge :

    Data Type Description
    BIGINT
    Integer (whole number) data from -2^63 (-9223372036854775808) through 2^63-1 (9223372036854775807).

    INT
    Integer (whole number) data from -2^31 (-2,147,483,648) through 2^31 - 1 (2,147,483,647).

    SMALLINT
    Integer data from 2^15 (-32,768) through 2^15 - 1 (32,767).

    TINYINT
    Integer data from 0 through 255.

    BIT
    Integer data with either a 1 or 0 value.

    DECIMAL
    Fixed precision and scale numeric data from -10^38 +1 through 10^38 –1.

    NUMERIC
    Functionally equivalent to decimal.

    MONEY
    Monetary data values from -2^63 (-922,337,203,685,477.5808) through 2^63 - 1 (+922,337,203,685,477.5807), with accuracy to a ten-thousandth of a monetary unit.

    SMALLMONEY
    Monetary data values from -214,748.3648 through +214,748.3647, with accuracy to a ten-thousandth of a monetary unit.

    FLOAT
    Floating precision number data from -1.79E + 308 through 1.79E + 308.

    REAL
    Floating precision number data from -3.40E + 38 through 3.40E + 38.

    DATETIME
    Date and time data from January 1, 1753, through December 31, 9999, with an accuracy of three-hundredths of a second, or 3.33 milliseconds.

    SMALLDATETIME
    Date and time data from January 1, 1900, through June 6, 2079, with an accuracy of one minute.

    CHAR
    Fixed-length non-Unicode character data with a maximum length of 8,000 characters.


    VARCHAR
    Variable-length non-Unicode data with a maximum of 8,000 characters.


    TEXT
    Variable-length non-Unicode data with a maximum length of 2^31 - 1 (2,147,483,647) characters.


    NCHAR
    Fixed-length Unicode data with a maximum length of 4,000 characters.


    NVARCHAR
    Variable-length Unicode data with a maximum length of 4,000 characters. sysname is a system-supplied user-defined data type that is functionally equivalent to nvarchar(128) and is used to reference database object names.

    NTEXT
    Variable-length Unicode data with a maximum length of 2^30 - 1 (1,073,741,823) characters.


    BINARY
    Fixed-length binary data with a maximum length of 8,000 bytes.

    VARBINARY
    Variable-length binary data with a maximum length of 8,000 bytes.

    IMAGE
    Variable-length binary data with a maximum length of 2^31 - 1 (2,147,483,647) bytes.

    CURSOR
    A reference to a cursor.

    SQL_VARIANT
    A data type that stores values of various SQL Server-supported data types, except text, ntext, timestamp, and sql_variant.

    TABLE
    A special data type used to store a result set for later processing.

    TIMESTAMP
    A database-wide unique number that gets updated every time a row gets updated.

    UNIQUEIDENTIFIER
    A globally unique identifier (GUID).

  3. #3
    Membre confirmé
    Profil pro
    Inscrit en
    Mai 2006
    Messages
    171
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2006
    Messages : 171
    Par défaut
    Ah bin c'est bizarre, ça marche maintenant. Avec nvarchar(MAX), ce n'est plus limité à 50 caractères. Ya un truc bizarre mon SQL Server

    Merci bien à vous

Discussions similaires

  1. [Access-->MSSQL]Problème type de donnée booléen
    Par guigui11 dans le forum MS SQL Server
    Réponses: 2
    Dernier message: 04/06/2008, 16h27
  2. Type pour données de type email avec @
    Par jeff37 dans le forum Langage SQL
    Réponses: 4
    Dernier message: 26/01/2004, 14h50
  3. Types de données interbase
    Par Clotilde dans le forum InterBase
    Réponses: 2
    Dernier message: 18/11/2003, 14h10
  4. Réponses: 2
    Dernier message: 22/09/2003, 11h23
  5. Convertir un type de donnée sous SQL Server
    Par Fleep dans le forum MS SQL Server
    Réponses: 2
    Dernier message: 19/08/2003, 15h15

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo