求SQL语句 - MS-SQL Server / 基础类
数据库表名student_info 使用查询语句select * from student_info;求SQL语句使得在查询分析器中所得到的数据导出成为一张EXCEL或者是CSV、TXT格式的文件到C:\student 下;
BCP 导入导出功能 EXEC master..xp_cmdshell 'bcp "select * from student_info" queryout C:\student\student_info.txt -c -Sservername -Usa -Ppassword' 学习了~ 晕 看来我得找相干资料学习下才行、、 EXEC master..xp_cmdshell 'bcp "select * from student_info" queryout C:\student\filename.xls -c -Sservername -Usa -Ppassword' 谢小F资料引用 SQL code SQL SERVER 和EXCEL的数据导入导出 1、在SQL SERVER里查询Excel数据: -- ====================================================== SELECT * from OpenDataSource( 'Microsoft.Jet.OLEDB.4.0', 'Data Source="c:\bo…… up.........
相关问答:
type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jas ......
从数据库中查询一张表的数据 select 部门,姓名 from tb 如何才能生成下面的xml格式 XML code: <folder state="unchecked" label="全部"> <folder state="unchecked&qu ......
tab1 字段:billdate,goodsid,incount,inmoney,outcount,outmoney,endprice,endcount,endamt tab2 字段:goodsid,goodskind(商品类型) tab3 字段:goodskind(商品类型),kindname 结果: 得到商品类型在一段时间 ......
表数据 COL1 COL2 COL2 COL4 COL5 ---------------------------------------------------------------------------------------------- 2010-05-05 00:00 ......
select o_customer,o_price from orders having o_price >=avg(o_price) select o_customer,o_price from orders where o_price >=(select avg(o_price) from orders) 我感觉没有区别啊,怎么在mysql会有 ......