Quantcast
Channel: ฟอรัม Getting started with SQL Server
Viewing all articles
Browse latest Browse all 8428

may i ask why there is an error in this query "ALTER TABLE [dbo].[test] ALTER COLUMN [two] nvarchar(2) NOT NULL, CHECK (len([two])=2)"

$
0
0

hi

   i'd like to ask where the following query is wrong:

ALTER TABLE [dbo].[test]
ALTER COLUMN [two] nvarchar(2) NOT NULL, CHECK (len([two])=2)

  why there is an error"Incorrect syntax near the keyword 'CHECK'."

   i'd just like to make the column"two" of table "test" that the length of this column can only be 2,but why there is error?

   could anyone help me?thank u very much

best regards

martin


Viewing all articles
Browse latest Browse all 8428

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>