·¢±íÒ»¿îSQL×Ö·û´®µÄ¼ò·±Ì庯Êý
簡體數據庫轉·±體數據庫µÄ問題 °ÝÍÐÁË
ALTER DATABASE DatabaseName SET SINGLE_USER WITH ROLLBACK IMMEDIATE
ALTER DATABASE DatabaseName COLLATE Chinese_Taiwan_Stroke_CI_AS
ALTER DATABASE DatabaseName SET MULTI_USER WITH ROLLBACK IMMEDIATE
執ÐÐÉÏÃæ語¾äÒÔáᣬËüÖ»ÊÇÐÂÔöµÄ±íĬ認ÊÇ·±體¶øÒÔ£¬Ô來¾ÍÓеıíËü沒轉換¡£
¶øÎÒÊÇÏë°ÑÒÔÇ°ËùÓеıíÒ»´Î轉換³É·±體µÄ£¬Ôõ麼辦£¿
-------------------
--·¢±íÒ»¿îSQL×Ö·û´®µÄ¼ò·±Ì庯Êý
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[f_GB2BIG]') and xtype in (N'FN', N'IF', N'TF'))
drop function [dbo].[f_GB2BIG]
GO
--Éú³ÉÂë±í
if exists (select * from dbo.sysobjects where id = object_id(N'[codetable]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [codetable]
GO
declare @j nvarchar(2000),@f nvarchar(2000)
select @j='°¨°ª°°®°¿°À°Â°Ó°Õ°Ú°Ü°ä°ì°í°ï°ó°÷°ù°þ±¥±¦±¨±«±²±´±µ±·±¸±¹±Á±Ê±Ï±Ð±Ò±Õ±ß±à±á±ä±ç±è±ê±î±ð±ñ±ô±õ±ö±÷±ý²¢²¦²§²¬²µ²·²¹²Æ²Î²Ï²Ð²Ñ²Ò²Ó²Ô²Õ²Ö²×²Þ²à²á²â²ã²ï²ó²ô²õ²ö²÷²ø²ù²ú²û²ü³¡³¢³¤³¥³¦³§³©³®³µ³¹³¾³Á³Â³Ä³Å³Æ³Í³Ï³Ò³Õ³Ù³Û³Ü³Ý³ã³å³æ³è³ë³ì³ï³ñ³ó³÷³ø³ú³û´¡´¢´¥´¦´«´¯´³´´´¸´¿´Â´Ç´Ê´Í´Ï´Ð´Ñ´Ó´Ô´Õ´Ú´Ü´í´ï´ø´ûµ£µ¥µ¦µ§µ¨µ¬µ®µ¯µ±µ²µ³µ´µµµ·µºµ»µ¼µÁµÆµËµÐµÓµÝµÞµßµãµæµçµíµöµ÷µüµýµþ¶¤¶¥¶§¶©¶ª¶«¶¯¶°¶³¶·¶¿¶À¶Á¶Ä¶Æ¶Í¶Ï¶Ð¶Ò¶Ó¶Ô¶Ö¶Ù¶Û¶á¶é¶ì¶î¶ï¶ñ¶ö¶ù¶û¶ü·¡·¢·£·§·©·¯·°·³·¶···¹·Ã·Ä·É·Ì·Ï·Ñ·×·Ø·Ü·ß·à·á·ã·æ·ç·è·ë·ì·í·ï·ô·ø¸§¸¨¸³¸´¸º¸¼¸¾¸¿¸Ã¸Æ¸Ç¸É¸Ï¸Ñ¸Ó¸Ô¸Õ¸Ö¸Ù¸Ú¸Þ¸ä¸é¸ë¸ó¸õ¸ö¸ø¹¨¹¬¹®¹±¹³¹µ¹¹¹º¹»¹Æ¹Ë¹Ð¹Ø¹Û¹Ý¹ß¹á¹ã¹æ¹è¹é¹ê¹ë¹ì¹î¹ñ¹ó¹ô¹õ¹ö¹ø¹ú¹ýº§º«ºººÅºÒº×ºØºáºäºèºìºóºø»¤»¦»§»©»ª»»®»°»³»µ»¶»·»¹»º»»»½»¾»À»Á»Æ»Ñ»Ó»Ô»Ù»ß»à»á»â»ã»ä»å»æ»ç»ë»ï»ñ»õ»ö»÷»ú»ý¼¢¼¥¼¦¼¨¼©¼«¼¼¶¼·¼¸¼»¼Á¼Ã¼
Ïà¹ØÎĵµ£º
http://www.javaeye.com/topic/366991#
×÷Ϊһ¸ö¿ª·¢ÈËÔ±£¬¿ªÊ¼ÈÏÕæϵͳѧϰ
Oracle SQLÒ²Ö»ÓÐÔÂÓ֮࣬ǰµÄ
SQLÖª
ʶ½ö½öÊÇÏîÄ¿ÀïÃæÓõ½Ê²Ã´¾ÍÈ¥¿´Ê²Ã´£¬¼òµ¥Ëµ¾ÍÊÇ
Read The Fxxking Guide¡£ÔÚϵͳѧϰ
Oracle
SQL֮ǰ£¬°³µÄÏë·¨¾ÍÊÇ“°´ÕÕÐèÇóÍê³É¹¦ÄÜ£¬Ê£ÏµĽ»¸ø
DBAÀ´´¦À픡£Õâ¸öÏë·¨´ÓÕûÌåÀ´¿´ÏÔ ......
SQLÖÐDATEADDºÍDATEDIFFµÄÓ÷¨
ÈÕÆÚ:2008-07-17 ×÷Õß:ϲ騰С¶þ 來Ô´:PHPChina
ͨ³££¬妳ÐèÒª獲µÃ當Ç°ÈÕÆÚºÍ計ËãһЩÆäËûµÄÈÕÆÚ£¬ÀýÈ磬妳µÄ³ÌÐò¿ÉÄÜÐèÒªÅÐ斷Ò»個ÔµĵÚÒ»Ìì»òÕß×îááÒ»Ìì¡£妳們´ó²¿·ÖÈË´ó¸Å¶¼ÖªµÀÔõ樣°ÑÈÕÆÚ進ÐзָÄê ......
×î½ü¼¸ÖÜÒ»Ö±ÔÚ½øÐÐÊý¾Ý¿âÅàѵ£¬ÀÏʦ¾«Õ¿µÄ¼¼ÊõºÍÉú¶¯µÄ½²½âʹÎÒÊÜÒæ·Ëdz¡£ÎªÁËÈøü¶àµÄÐÂÊÖÊÜÒ棬ÎÒ³é¿Õ°ÑSQLÓï¾äÓÅ»¯²¿·Ö½øÐÐÁËÕûÀí£¬Ï£Íû´ó¼ÒÒ»Æð½ø²½¡£¡¡¡¡
¡¡¡¡Ò»¡¢²Ù×÷·ûÓÅ»¯¡¡¡¡
¡¡1¡¢IN ²Ù×÷·û ¡¡¡¡
¡¡¡¡ÓÃINд³öÀ´µÄSQLµÄÓŵãÊDZȽÏÈÝÒ×д¼°ÇåÎúÒ׶®£¬Õâ±È½ÏÊʺÏÏÖ´úÈí¼þ¿ª·¢µÄ·ç¸ñ¡£µ«ÊÇÓÃINµÄSQLÐÔÄÜ×ÜÊÇ±È½Ï ......
CREATE PROCEDURE dbo.UspOutputData
@tablename sysname
AS
declare @column varchar(1000)
declare @columndata varchar(1000)
declare @sql varchar(4000)
declare @xtype tinyint
declare @name sysname
declare @objectId int
declare @objectname sysname
declare @ident int
set nocount on
......
±È½ÏÁ½¸öSQLµÄÖ´ÐÐʱ¼ä
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PROC_SQL_COMP]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[PROC_SQL_COMP]
GO
/*--²âÊÔÁ½×éSQLµÄƽ¾ùʱ¼ä
ÀûÓÃosql.exeÀ´²âÊÔÁ½×é SQL Óï¾äµÄÖ´ÐÐʱ¼ä
²âÊԵĴ洢¹ý³ ......