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

SQLÉí·ÝÖ¤¸ñʽÑéÖ¤


SQL°æ±¾Éí·ÝÖ¤¸ñʽÑéÖ¤ 0Ϊ´íÎó£¬1ΪÕýÈ·
CREATE  function [dbo].[IsID](@str nvarchar(18),@sex int)--´«ÈëÁ½¸ö±äÁ¿ Éí·ÝÖ¤ºÍÐÔ±ð(ÄÐ1Å®2)
returns bit
as
begin
declare @len int
declare @result bit
--set @result=0
set @len=len(@str)
if(@len!=18 and @len!=15)--³¤¶ÈÊÇ18λ»ò15λ
 begin
  set @result=0
 end
else
if(case when @len=18 then left(@str,17) else @str end like   '%[^0-9]%' )--15λÉí·Ý֤ҪΪÊý×Ö,18λÉí·Ý֤ǰ17λ±ØÐëÊÇÊý×Ö
 begin
  set @result=0
 end
else
if(@len=18)--Èç¹ûÉí·ÝÖ¤ÊÇ18λ
 begin--½øÐÐÂß¼­¼ÆËã
  declare @k int
  declare @l nvarchar(11)
  set @l='10X98765432'
  set @k=
  convert(int,left(@str,1))*7+
  convert(int,substring(@str,2,1))*9+
  convert(int,substring(@str,3,1))*10+
  convert(int,substring(@str,4,1))*5+
  convert(int,substring(@str,5,1))*8+
  convert(int,substring(@str,6,1))*4+
  convert(int,substring(@str,7,1))*2+
  convert(int,substring(@str,8,1))*1+
  convert(int,substring(@str,9,1))*6+
  convert(int,substring(@str,10,1))*3+
  convert(int,substring(@str,11,1))*7+
  convert(int,substring(@str,12,1))*9+
  convert(int,substring(@str,13,1))*10+
  convert(int,substring(@str,14,1))*5+
  convert(int,substring(@str,15,1))*8+
  convert(int,substring(@str,16,1))*4+
  convert(int,substring(@str,17,1))*2
  set @k=@k%11
  if(Upper(right(@str,1))!=substring(@l,@k+1,1))--Âß¼­¼ÆËãµÄ½á¹ûºÍÉí·ÝÖ¤×îºóһλ±ØÐëÏàµÈ
   begin
    set @result=0
   end
  else
  if(convert(int,substring(@str,17,1))%2!=@sex%2 and @sex in (1,2))--17λ´ú±íÐÔ±ð,ÆæÊýÊÇÄÐÐÔ,żÊýΪŮÐÔ
   begin
    set @result=0
   end
  else
&nbs


Ïà¹ØÎĵµ£º

VB.NETÖÐÄܲ»ÄܶÔDATASETÔÙÓÃSQLÓïÑÔ

¿ÉÒÔɸѡÊý¾Ý£¬µ«²»ÄÜÊDZê×¼µÄSQLÓï¾ä£º
Me.DsUserManager1.Tables(0).Select("id > 5 and id <20")
---------------------------------------------------------------
1.ɸѡ£º
dataset.tables("tabname").select("id=1")'Ï൱ÓÚSQLÖÐWHEREºóµÄÌõ¼þÄÚÈÝ
2.±£´æµ½ÄÄ£¿Õâµ¹ÊDz»Öª ......

sqlÃæÊÔÌâÄ¿

Sql³£ÓÃÓï·¨ÏÂÁÐÓï¾ä²¿·ÖÊÇMssqlÓï¾ä£¬²»¿ÉÒÔÔÚaccessÖÐʹÓá£
 
SQL·ÖÀࣺ
DDL—Êý¾Ý¶¨ÒåÓïÑÔ(CREATE£¬ALTER£¬DROP£¬DECLARE)
DML—Êý¾Ý²Ù×ÝÓïÑÔ(SELECT£¬DELETE£¬UPDATE£¬INSERT)
DCL—Êý¾Ý¿ØÖÆÓïÑÔ(GRANT£¬REVOKE£¬COMMIT£¬ROLLBACK) Ê×ÏÈ,¼òÒª½éÉÜ»ù´¡Óï¾ä£º
1¡¢ËµÃ÷£º´´½¨Êý¾Ý¿â
CREATE ......

Ò»²¿µçÄÔ,Íæתsql server¶à»úÁ¬½Ó.

    ×î½ü,Òò¸öÈ˵çÄÔÓ²ÅÌËð»µ,йºÈëÁË500GµÄ´óÓ²ÅÌ,°²×°ÁËwindows7,ÔÚwin7ÉÏ°²×°Á˶à¸öÐéÄâxp»ú,ÐéÄâ»úÓëʵ¼ÊµÄ»úÆ÷(Ö÷»ú)×é³ÉÁËÒ»¸ö¾ÖÓòÍø,ʵÏÖÔÚÐéÄâ»úÖÐͨ¹ýÔ¶³ÌÁ¬½ÓÖ÷»úµÄsql server.ÏÖ½«ÎÒµÄÊÔÑé¹ý³Ì½éÉÜÈçÏÂ,¹©ÓÐÐËȤ³¢ÊԵĴóÏÀ²Î¿¼.
1. °²×°ÐéÄâ»ú»·¾³.
ÏÈ°²×°window7.0Æì½¢°æ (רҵÓëÆóÒµ°æÒ²¿ ......

Oracle SQL PLUS µÇ¼ Æô¶¯ ¹Ø±Õ


Oracle SQL PLUS »ù±¾²Ù×÷1
怬
c:\>sqlplus "sys/test1234 as sysdba"  ÒÔsysdbaÉí·ÝµÇ¼
 
c:\>sqlplus/nolog   ÒÔnologÉí·ÝµÇ¼
sql> connect sys/test1234 as sysdba
Connected.
 
 
Æô¶¯ 
SQL>  startup    &nb ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ