Skip to content
Advertisement

What is a type of my value 675763582022462206:57 in sql creating data table query?

I am creating a table with several columns in sql:

CREATE TABLE.....

and one of them is going to have values like this: 675763582022462206:57. As you see it has : in it. So what is a type of it? Is it UInt16 or String?

Advertisement

Answer

It must be varchar or nvarchar in this case. The database doesn’t recognize “:” as a part of a number, unless you say to Windows in advanced region settings that this is your decimal point. If you can store 57 (after “:”) in a different column, then you can save the number before “:” as a bigint if you wish

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement