Image a situation when you use the SQL Server RAND() T-SQL function as a column in a SELECT statement, and the same value is returned for every row as shown below. In this tip, Dallas Snider explains how you can get differing random values on each row.
Sometimes you just need to populate a CHAR/VARCHAR column for testing with a random selection of string literals at table CREATE time. Here is a quick and easy script.
I have this view:
CREATE OR ALTER VIEW dbo.City AS SELECT TOP 10 cn.CityNameID, cn.CityName FROM dbo.CityName AS cn WITH CHECK OPTION GOHow can I modify the view to make it is updatable with this code?
INSERT City (CityName) VALUES ('Dillon')See possible answers