向student表中插入记录“张明”,“男”,“电工学院”,“2004127001”,高手请写一下过程,不甚感激!

解决方案 »

  1.   

    insert into student 
    values('张明','男'.'电工学院','2004127001')
      

  2.   

    insert into student 
    values('张明','男','电工学院','2004127001')
    修改了下
      

  3.   

    --如果你的表只有这几个字段的话 且顺序依次这么排的就这么写
    insert into student 
    values('张明','男','电工学院','2004127001')
    --如果这只是其中四个字段 则
    insert into student (name,sex,dept,sno)
    values('张明','男','电工学院','2004127001')
      

  4.   

    当然你还可以这样--如果你的表只有这几个字段的话 且顺序依次这么排的就这么写
    insert into student 
    select '张明','男','电工学院','2004127001'
    --如果这只是其中四个字段 则
    insert into student (name,sex,dept,sno)
    select '张明','男','电工学院','2004127001'
      

  5.   

    字段对应就好了,还有需要时加个N
    insert into student (name,sex,dept,sno)
    values(N'张明',N'男',N'电工学院','2004127001')