Skip to content

Instantly share code, notes, and snippets.

@ArCiGo
Created May 20, 2019 00:24
Show Gist options
  • Save ArCiGo/fe8e9558e40aa1cf0264803138fcd834 to your computer and use it in GitHub Desktop.
Save ArCiGo/fe8e9558e40aa1cf0264803138fcd834 to your computer and use it in GitHub Desktop.
DECLARE @myDecimalValue FLOAT
SET @myDecimalValue = 4521312.531
SELECT CONVERT(INT, @myDecimalValue)
/** Output **/
-----------
4521312
DECLARE @msg VARCHAR(200) = ''
SET @msg = 'The Customer already exists!'
DECLARE @pCustomerId INT
SELECT @pCustomerId = ISNULL(MAX(cus.Id), 0) + 1 FROM Customer cus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment