ÏîÄ¿ÐèÒª½«AccessÊý¾Ý¿âÖеÄÊý¾Ýµ¼Èëµ½SQL ServerÖУ¬ÐèÒª¼ìÑéµ¼ÈëºóµÄÊý¾ÝÍêÕûÐÔ£¬Êý¾ÝÖµÊÇ·ñÕýÈ·¡£ÎÒÃÇʹÓõÄÊÇMicrosoft SQL Server 2008 Migration Assistant for AccessÕâ¸ö¹¤¾ß£¬´Î¹¤¾ßרÃÅÓÃÀ´½«AccessÖеÄÊý¾Ý¿âµ¼³öµ½SQL ServerÖУ¬ÎÒÃǵÄÒÉÂÇÊÇÕâ¸öµ¼³ö¹ý³ÌÖл᲻»áÒòΪÈÏΪµÄÔÒòµ¼ÖÂÊý¾Ý´íÎó»òÕßÊý¾ÝÖ®¼äµÄ¹ØÁª¶ªÊ§£¬¿´ÆðÀ´Óеã¶à´ÎÒ»¾Ù£¬µ«ÊÇ»¹ÊÇÕÒ·½·¨À´×ö²âÊÔ¡£ÓÚÊǾͲúÉúÁ˽ñÌìµÄÎÊÌ⣬Ôõô´ÓSQL ServerÖÐÕÒ³öËùÓеÄÊý¾ÝÁеÄÀàÐÍ£¬×ֶδóС£¬ÊÇ·ñ¿ÉΪ¿Õ£¬ÊÇ·ñÊÇÖ÷¼ü£¬Ô¼ÊøµÈµÈÐÅÏ¢¡£ÎÒÕҺܶà×ÊÁϹĵ·³öÕâ¸ö´æ´¢¹ý³Ì£¬ÏÈÀ´¿´¿´´úÂ룺
1
USE
[
MIS
]
2 GO
3
4 /* ***** Object: StoredProcedure [dbo].[sp_SelectColumnInfor] Script Date: 09/23/2010 19:00:28 ***** */
5 SET ANSI_NULLS ON
6 GO
7
8 SET QUOTED_IDENTIFIER ON
9 GO
10
11 create procedure [ dbo ] . [ sp_SelectColumnInfor ]
12 as
13
declare
@table_name
varchar
(
250
)
14 -- create a temp table
15 create table #tempTable(
16 TABLE_NAME nvarchar ( 128 ),
17 COLUMN_NAME nvarchar ( 128 ),
18 IS_NULLABLE varchar ( 3 ),
19 DATA_TYPE nvarchar ( 128 ),
20 CHARACTER_MAXIMUM_LENGTH int ,
21 CONSTRAINT_NAME nvarchar ( 128 ),
22 )
23 -- create a cursor
24 declare curTABLE cursor for
25 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_TYPE = BASE TABLE
26 for read only
27
28 open curTABLE
29 fetch next
2 GO
3
4 /* ***** Object: StoredProcedure [dbo].[sp_SelectColumnInfor] Script Date: 09/23/2010 19:00:28 ***** */
5 SET ANSI_NULLS ON
6 GO
7
8 SET QUOTED_IDENTIFIER ON
9 GO
10
11 create procedure [ dbo ] . [ sp_SelectColumnInfor ]
12 as
14 -- create a temp table
15 create table #tempTable(
16 TABLE_NAME nvarchar ( 128 ),
17 COLUMN_NAME nvarchar ( 128 ),
18 IS_NULLABLE varchar ( 3 ),
19 DATA_TYPE nvarchar ( 128 ),
20 CHARACTER_MAXIMUM_LENGTH int ,
21 CONSTRAINT_NAME nvarchar ( 128 ),
22 )
23 -- create a cursor
24 declare curTABLE cursor for
25 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_TYPE = BASE TABLE
26 for read only
27
28 open curTABLE
29 fetch next