[training]ASP.NET MVC 5 – DDL 資料定義語言

--新增含有三個欄位的TABLE
CREATE TABLE COURSE(
CNAME NVARCHAR(128) PRIMARY KEY,
CREDIT INT,
TEACHER NVARCHAR(30)
)

=========================

--在既有TABLE新增一個欄位
ALTER TABLE SCORE
ADD NEWFILED VARCHAR(10)

--修改欄位形態
ALTER TABLE SCORE ALTER COLUMN NEWFILED INT

--刪除欄位
ALTER TABLE SCORE DROP COLUNN NEWFILD 

=========================

--刪除TABLE
DROP TABLE dbo.AVERAGE

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.