随笔分类 -  数据库

摘要:--远程操作数据库SQL语句exec sp_addlinkedserver 'ITSV ', ' ', 'SQLOLEDB ', '211.81.251.85 'exec sp_addlinkedsrvlogin 'ITSV ', 'false ',null, 'sa', 'sa' select * from ITSV.VirtualLab.dbo.tbl_userexec sp_dropserver 'ITSV ', 'droplogins 阅读全文
posted @ 2013-11-13 17:21 youhumian 阅读(240) 评论(0) 推荐(0)
摘要:1.如何删除表的某一列alter table xxx drop colomn xxx;2.增加某一列alter table xxx add columnname type;eg:alter table student add age number;3.修改某一列alter table xxx modify (columname type);//括号可要可不要4.修改表名rename oldtable to newtable;5.2张表,stu(sid,sname)和ac(aid,sid,aname,score),分表为学生id,学生姓名,成绩id,科目,分数1).查询数学成绩大于85的前5到1 阅读全文
posted @ 2013-10-02 14:46 youhumian 阅读(186) 评论(0) 推荐(0)