public DataTable GetTable(string Id) { StringBuilder strSql = new StringBuilder(); DataSet ds = new DataSet(); using (SqlConnection conn = new SqlConnection("server=localhost;database=MyData;uid=sa;pwd=123")) { conn.Open(); strSql.Append("S
--1.建立表:Coursecreate table Course( ID int identity(1,1),--ID Student varchar(20) ,--学生 Sub varchar(20) ,--课程) --2.插入数据INSERT INTO CourseVALUES ('张三','语文'),('李四','语文' ),('王五','语文' ) INSERT INTO CourseVALUES ('张三','语文'),('李四','英语' ),('王五','数学' ) INSERT