"레코드생성일자" DATETIME NOT NULL DEFAULT 'getdate()',
"레코드수정일자" DATETIME NOT NULL DEFAULT '' ON UPDATE CURRENT_TIMESTAMP,
ALTER TABLE stock ADD "레코드생성일자2" DATETIME NOT NULL DEFAULT 'GETDATE()';
ALTER TABLE stock ADD CONSTRAINT DF_YourTable DEFAULT GETDATE() FOR YourColumn
ALTER TABLE dbo.MyTable ADD CONSTRAINT my_Con DEFAULT GETDATE() for created UPDATE MyTable SET Created = GetDate() where Created IS NULL ALTER TABLE dbo.MyTable ALTER COLUMN Created DATETIME NOT NULL
댓글 없음:
댓글 쓰기