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
Normally, when you run a command in the terminal,...
Table of contents 1. Use RGB to represent color 2...
I believe many programmers are familiar with MySQ...
Using the Docker run command docker run -d -p 920...
Table of contents javascript tamper-proof object ...
We better start paying attention, because HTML Po...
This article is welcome to be shared and aggregat...
When installing Tomcat in Docker, Tomcat may over...
This article mainly introduces the example analys...
MySql uses joined table queries, which may be dif...
What is Docker-Compose The Compose project origin...
Linux basic configuration Compile and install pyt...
There is no problem with the Dockerfile configura...
1. Unzip the zip package to the installation dire...
//grammar: @media mediatype and | not | only (med...