3. Operation of the data table

The database used is still based on 2. The operation of the database jxgl

Create a data table

(1) Create a graphical interface, we will not say much

(2) Transact_sql statement creation

Example: Create student table under jxgl database

use jxgl

go

create table student

(Student ID char (10), name nvarchar (4) not null, gender nchar (1), department nvarchar (10), college entrance examination score smallint)

 

Management Data Sheet

Example: Modify the student table under the jxgl database to add a column for minorities, which is of type bit. Then delete this column in this table

use jxgl

go

alter table student

      add minority bit

go

alter table student 

      drop column minority

go

 

Delete data table

Example: Delete student table under jxgl database

drop table student

go

 

Published 105 original articles · Like 536 · Visits 70,000+

Guess you like

Origin blog.csdn.net/qq_41934990/article/details/105458470