sql >> Database teknologi >  >> RDS >> Sqlserver

Deaktiver midlertidigt begrænsninger (MS SQL)

-- Disable the constraints on a table called tableName: ALTER TABLE tableName NOCHECK CONSTRAINT ALL -- Re-enable the constraints on a table called tableName: ALTER TABLE tableName WITH CHECK CHECK CONSTRAINT ALL --------------------------------------------------------- -- Disable constraints for all tables in the database: EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT ALL' -- Re-enable constraints for all tables in the database: EXEC sp_msforeachtable 'ALTER TABLE ? WITH CHECK CHECK CONSTRAINT ALL' ---------------------------------------------------------

  1. Er der et versionskontrolsystem til databasestrukturændringer?

  2. Bruger env variabel i Spring Boots application.properties

  3. Hvad er forskellen mellem INNER JOIN, LEFT JOIN, RIGHT JOIN og FULD JOIN?

  4. ORA-00947 Ikke nok værdier, mens typen erklæres globalt