Augusto Humire Martinez web blog

algo de web-in

Cambiar Collation a una columna

ALTER TABLE Operacion
ALTER COLUMN CodigoCliente NVARCHAR(50)
COLLATE SQL_Latin1_General_CP1_CI_AS NULL
GO

agosto 10, 2020 Posted by | Base de Datos | Deja un comentario

Objetos de un esquema

SELECT 1–*
,(SCHEMA_NAME(schema_id) + ‘.’ + name) AS object_name
,SCHEMA_NAME(schema_id) AS schema_name
,type
,type_desc
,create_date
,modify_date
FROM sys.objects A
WHERE 1 = 1
AND modify_date > GETDATE() – 3000
AND type = ‘U’ –[U:User Table|P:Procedure]
AND SCHEMA_NAME(schema_id) = ‘RC’
AND NAME NOT LIKE ‘x_%’
ORDER BY A.modify_date;
GO

agosto 9, 2020 Posted by | Base de Datos | Deja un comentario