some one suggested me its a better idea to use float as a primary key of a table instead of using the BIGINT. can we make float primary key to be identity ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Considerations:
data type int, bigint, smallint, tinyint, or decimal or numeric with
a scale of 0
SQL Server will allow you but its not recommended mainly because
floats are inaccurate as @Andy said.
why do you need a float as a PK anyway? Do you need a value like 3,1234235234534 to uniquely identify your row?