欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費電子書(shū)等14項超值服

開(kāi)通VIP
ms sql server中檢測郵件地址的函數

if object_id('fnCheckEmail') is not null
      drop function fnCheckEmail
GO
----創(chuàng )建驗證函數,返回值為1表示正確,否則格式錯誤
create function fnCheckEmail(@Email varchar(1000))
returns bit
as
begin
declare @rtv bit
if
    charindex(' ',@email) > 0 or     /*含有空格*/
    len(@email) - len(replace(@email,'.','')) > 1 or /*'.'超過(guò)1個(gè)*/
    len(@email) - len(replace(@email,'@','')) > 1 or /*'@'超過(guò)1個(gè)*/
    right(@email,1) = '.' or   /*以'.'結尾*/
    right(@email,1) = '@' or   /*以'@'結尾*/
    left(@email,1) = '.' or    /*以'.'開(kāi)頭*/
    left(@email,1) = '@' or    /*以'.'開(kāi)頭*/
    charindex('.',@email)-charindex('@',@email) < 0 or /*'.'在'@'前面*/
    charindex('@',@email)-charindex('.',@email) = 1 or /*'@'與'.'相鄰*/
    charindex('.',@email)-charindex('@',@email) = 1    /*'@'與'.'相鄰*/
    set @rtv = 0
else
    set @rtv = 1
return @rtv
end

GO
----創(chuàng )建測試數據
declare @t table(email varchar(1000))
insert @t
select 'ab.cxyz@s.com' union all
select 'ab@xyz@s.com' union all
select '@abc@xyz.com' union all
select 'abcxyz.com@' union all
select '.abcxyz@com' union all
select 'abc@xyz@com.' union all
select 'ab.c@xyzcom' union all
select 'abc@.com' union all
select 'abc@xyz.com' union all    /*格式正確*/
select 'ab c@xyzcom'
----驗證
select *,case dbo.fnCheckEmail(email) when 1 then '正確' else '錯誤' end from @t

----清除測試環(huán)境
drop function fnCheckEmail

本站僅提供存儲服務(wù),所有內容均由用戶(hù)發(fā)布,如發(fā)現有害或侵權內容,請點(diǎn)擊舉報。
打開(kāi)APP,閱讀全文并永久保存 查看更多類(lèi)似文章
猜你喜歡
類(lèi)似文章
Sql Server 配置IP地址連接
MS-SQL Server 大文本的保存
MS SQL Server 備份與恢復詳解
SQLServer2008數據庫連接error40錯誤
SQLServer數據庫實(shí)例相關(guān)知識筆記
SQLServer字符串替換函數REPLACE
更多類(lèi)似文章 >>
生活服務(wù)
分享 收藏 導長(cháng)圖 關(guān)注 下載文章
綁定賬號成功
后續可登錄賬號暢享VIP特權!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服

欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久