Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

SQLSERVER Ìí¼ÓÒ»¸ö²»¿ÉΪ¿ÕµÄ×Ö¶Î

SqlServer ±íÖе±Ö®Ç°ÓмǼµÄʱºò·¢ÏÖ±íÉè¼ÆµÄ²»ºÏÀíÒª¼Ó×ֶΣ¬
µ«ÊÇalter table Skating_Consumption add MemberCardId numeric(9)Ö»ÄܼӿÉΪ¿ÕµÄ×ֶΣ¬
½â¾ö°ì·¨£¬
µÚÒ»¡¢¼Ó¸öΪ¿ÕµÄ×Ö¶Î
µÚ¶þ¡¢¸üбíÖмǼÕâ¸ö×Ö¶ÎΪij¸öÖµ
µÚÈý¡¢ÔÙ¸ü¸Ä±í×Ö¶ÎΪ·Ç¿Õ
Óï¾ä
alter table Skating_Consumption add MemberCardId numeric(9)
go
update Skating_Consumption set MemberCardId='0'
go
ALTER TABLE Skating_Consumption ALTER COLUMN
MemberCardId numeric(9) not null


Ïà¹ØÎĵµ£º

ͨÓõÄSqlServer²Ù¿ØÀà

 using System;
using System.Collections;
using System.Collections.Specialized;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Collections.Generic;


public class CommandInfo
{
public string CommandText;
public SqlPa ......

Óû§"sa "µÇ½ʧ°Ü SQLServer ´íÎó18456

ÓÃwindowsÕ˺Ż¹ÊÇ¿ÉÒԵǼµÄ¡£
²éÕÒÎÊÌâµÄ¹ý³Ì£º
µÚÒ»²½£º Æô¶¯ËùÓÐÓëSQLÓйصķþÎñ£¬ÎÊÌâÒÀ¾É£»
µÚ¶þ²½£º ²é¿´windows·À»ðǽ£¬±»Ä¬ÈÏÆô¶¯ÁË£¬²»Æô¶¯Ñ¡ÔñÏî±»Disabled¡£Á½¸öÌáʾ“ÓÉÓÚ°²È«¿¼ÂÇ,ijЩÉèÖÃÓÉ×é²ßÂÔ¿ØÖÆ”“Windows·À»ðǽÕýÔÚʹÓÃÄúµÄÓòÉèÖÔ£¬ÏÈÓÃgpedit.msc´ò×é²ßÂԱ༭Æ÷£¬»úËã»úÅ ......

SQLServer Óαê¼ò½éÓëʹÓÃ˵Ã÷

 Óα꣨Cursor£©ÊÇ´¦ÀíÊý¾ÝµÄÒ»ÖÖ·½·¨£¬ÎªÁ˲鿴»òÕß´¦Àí½á¹û¼¯ÖеÄÊý¾Ý£¬ÓαêÌṩÁËÔÚ½á¹û¼¯ÖÐÒ»´ÎÒÔÐлòÕ߶àÐÐÇ°½ø»òÏòºóä¯ÀÀÊý¾ÝµÄÄÜÁ¦¡£ÎÒÃÇ¿ÉÒÔ°ÑÓα굱×÷Ò»¸öÖ¸Õ룬Ëü¿ÉÒÔÖ¸¶¨½á¹ûÖеÄÈκÎλÖã¬È»ºóÔÊÐíÓû§¶ÔÖ¸¶¨Î»ÖõÄÊý¾Ý½øÐд¦Àí¡£
      1.ÓαêµÄ×é³É
    ......

SQLServer ´æ´¢¹ý³Ì¼ò½éÓëʹÓ÷½·¨

 Sql ServerµÄ´æ´¢¹ý³ÌÊÇÒ»¸ö±»ÃüÃûµÄ´æ´¢ÔÚ·þÎñÆ÷ÉϵÄTransacation-SqlÓï¾ä¼¯ºÏ,ÊÇ·â×°Öظ´ÐÔ¹¤×÷µÄÒ»ÖÖ·½·¨,ËüÖ§³ÖÓû§ÉùÃ÷µÄ±äÁ¿¡¢Ìõ¼þÖ´ÐкÍÆäËûÇ¿´óµÄ±à³Ì¹¦ÄÜ¡£
      ´æ´¢¹ý³ÌÏà¶ÔÓÚÆäËûµÄÊý¾Ý¿â·ÃÎÊ·½·¨ÓÐÒÔϵÄÓŵ㣺
        &nbs ......

02 SQLServer³£Óú¯Êý

/******************************
ϵͳº¯Êý
******************************/

--convert ÓÃÀ´×ª±äÊý¾ÝÀàÐÍ
--convert (data_type[(length)], expression [, style])
select convert(int,convert(varchar(5),12345)+'678')+1 --·µ»Ø12345679
--cast Ò²ÊÇÓÃÀ´×ª»»Êý¾ÝÀàÐÍ
--cast(expression as data_type[(l ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ