»ñÈ¡SQL ServerËùÓÐÊý¾Ý¿âÃû£¬±íÃû£¬×Ö¶ÎÃû
/*
* Source URL: http://jonsion.javaeye.com/blog/511584
*/
1. »ñÈ¡ËùÓÐÊý¾Ý¿âÃû
1> SELECT name from master..sysdatabases;
2> go
2. »ñÈ¡ËùÓбíÃû
1> USE master
2> go
1> SELECT name from sysobjects WHERE type='U';
2> go
3. »ñÈ¡ËùÓÐ×Ö¶ÎÃû
1> SELECT name from syscolumns WHERE id=object_id('table_name');
Ïà¹ØÎĵµ£º
-----------------------------------------------------
--×÷ÓãºÓÃÓÚsql server 2005 µ¼³öÓû§±íÊý¾Ý×Öµä
--1 ĬÈϵ¼³öµ±Ç°Êý¾Ý¿âÖÐËùÓÐÓû§±í(xtype = 'u')µÄÊý¾Ý×ֵ䣻
--2 ¿ÉÒÔÔÚxtype = 'u'Ìæ»»ÎªÈçÏÂËùʾÓï¾äxtype = 'u' and name in ('son','Person') µ¼³ö×Ô¶¨ÒåµÄ±íµÄÊý¾Ý×ֵ䣻
--3 ¿ÉÒÔÀûÓü¯³É·þÎñSSISµ¼³ ......
·Ö²¼Ê½²éѯ
OPENROWSET
´ÓExcelÈ¡Êý¾Ý
SELECT * from OPENROWSET('Microsoft.Jet.OLEDB.4.0','Excel 8.0;Database=d:\1.xls',[Sheet1$])
´ÓOracleÈ¡Êý¾Ý
SELECT * from OPENROWSET('MSDAORA.1','NetServiceName ......
--¸Ã±í±£´æ½á¹û
create table c(c1 tinyint, c2 tinyint, c3 tinyint, c4 tinyint, c5 tinyint, c6 tinyint, c7 tinyint, c8 tinyint, c9 tinyint, c10 tinyint, c11 tinyint, c12 tinyint, c13 tinyint, c14 tinyint, c15 tinyint, c16 tinyint, c17 tinyint, c18 tinyint, c19 tinyint, c20 tinyint, c21 tinyint, c22 t ......
dim conn,connstr
Set conn = Server.CreateObject("ADODB.Connection")'´´½¨Ò»¸öÊý¾Ý¿âÁ´½Ó¶ÔÏóconn£¬·½±ãºóÃæµ÷ÓÃ
connstr="Provider=SQLOLEDB;Data Source=(local);Initial Catalog=111;User ID=sa;Password=1234;" '´´½¨Ò»¸öÊý¾Ý¿âµÄrecordset¶ÔÏ󣬷½±ãÒÔºóµ÷ÓÃ
conn.Open connstr'´ò¿ªÊý¾Ý¿â ......
1.
SQL> desc gjh_a05 ;
Name Type Nullable Default Comments
----- ------------- -------- ------- --------
A0500 VARCHAR2(2) Y &nbs ......