You can write a function: Mainly use regular expressions to make judgments. If the input character is empty, use "-" to replace it. CREATE FUNCTION [dbo].[svf_NonNegativeInteger] ( @val NVARCHAR(4000) ) RETURNS BIT AS BEGIN DECLARE @rtv BIT = 1 SET @val = ISNULL(LTRIM(RTRIM(@val)), N'-') IF @val LIKE '%[^0-9]%' OR @val = N'' SET @rtv = 0 ELSE SET @rtv = 1 RETURN @rtv END Example description: Summarize The above is the example code of the MYSQL custom function to determine whether it is a positive integer. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: How to install Django in a virtual environment under Ubuntu
>>: How to completely uninstall iis7 web and ftp services in win7
Server placement It is recommended to use cloud s...
Table of contents Initialization of echart app-ba...
Configure Java environment variables Here, the en...
This article example shares the specific code of ...
This article mainly introduces the principle and ...
Now there are many WeChat public account operatio...
1. Environmental requirements 1. Docker 17 and ab...
In this section, the author describes the special...
JavaScript now releases a new version every year,...
In the previous article, after configuring the we...
1. Javascript returns to the previous page history...
In the process of writing the project page, I enc...
This article describes how to implement coexisten...
Basic Concepts By default, Compose creates a netw...
Hexo binds a custom domain name to GitHub under W...