Rank: Administration
Medals: Groups: Administrators
Joined: 10/20/2012 Posts: 106 Points: 327 Location: Tbilisi
Thanks: 0 times Was thanked: 0 time(s) in 0 post(s)
|
-- Version : SQL Server 2008 BB კოდი: /* ჯერ გავიგოთ როგორია database default collation */ DECLARE @collationname nvarchar(200) = convert(nvarchar(200),(DATABASEPROPERTYEX('<<DatabaseName>>','Collation')))
SELECT @collationname as database_collationname, a.collation_name, a.name AS Column_Name, b.name AS Table_name, t.name AS TypeName, t.is_user_defined, t.is_assembly_type, a.max_length, a.precision, a.scale, o.type, i.object_id FROM sys.columns AS a INNER JOIN sys.tables AS b ON a.object_id = b.object_id INNER JOIN sys.types AS t ON a.user_type_id = t.user_type_id INNER JOIN sys.objects AS o ON a.object_id = o.object_id INNER JOIN sys.indexes AS i ON a.object_id = i.object_id WHERE (a.collation_name <> @collationname) AND (o.type NOT IN ('PK', 'P', 'FN', 'S')) AND (i.type <> 1) ORDER BY Table_name
|
|
Apex ltd. http://www.apex.ge
|