I want to count rows table with condition is today so I add this to a columns in table. With this column I can show order in my business (today). But when many request insert to db at the same time the value count can be same. So how I can get value count not be same when insert same time. Ex this my code:
DECLARE @countNum int
SELECT SET @countNum = COUNT(*) FROM Table
INSERT INTO Table(Id, MyWantText) VALUES(NEWID(), 'This-identity-'+@countNum)
Hope for help!