Thursday, February 23, 2023

Sütun Tipleri - NVARCHAR - UNICODE Karakterler İçindir

Giriş
VARCHAR ile aynıdır. İsminde N olduğu için UNICODE karakterler içindir

Örnek
Şöyle yaparız
CREATE TABLE book (
    id BIGINT NOT NULL PRIMARY KEY,
    isbn VARCHAR(15),
    properties NVARCHAR(4000) CHECK(
        ISJSON(properties) = 1
    )
)
Açıklaması şöyle
Notice that the properties column type is NVARCHAR(4000), and we defined a column-level constraint check which uses the ISJSON SQL Server function to validate whether the properties column is storing a proper JSON object.

No comments:

Post a Comment

ORDER BY + OFFSET + FETCH - Sayfalama İçindir

Örnek SQL Server 2012 ve sonrasında şöyle yaparız SELECT * FROM Employees ORDER BY EmployeeID ASC OFFSET 10 ROWS         -- Skip the first 1...