20-populate-types.td 1.0 KB

123456789101112131415161718192021
  1. # Copyright Materialize, Inc. and contributors. All rights reserved.
  2. #
  3. # Use of this software is governed by the Business Source License
  4. # included in the LICENSE file at the root of this repository.
  5. #
  6. # As of the Change Date specified in that file, in accordance with
  7. # the Business Source License, use of this software will be governed
  8. # by the Apache License, Version 2.0.
  9. #
  10. # Test some fringe types specific to SQL Server
  11. #
  12. $ sql-server-connect name=sql-server
  13. server=tcp:sql-server,1433;IntegratedSecurity=true;TrustServerCertificate=true;User ID=sa;Password=${arg.sa-password}
  14. $ sql-server-execute name=sql-server
  15. USE test;
  16. CREATE TABLE types_table (decimal_col DECIMAL(5,2), datetimeoffset_col DATETIMEOFFSET(4), datetime2_col DATETIME2(7), smalldatetime_col SMALLDATETIME, bit_col BIT, pk INTEGER PRIMARY KEY);
  17. EXEC sys.sp_cdc_enable_table @source_schema = 'dbo', @source_name = 'types_table', @role_name = 'SA', @supports_net_changes = 0;
  18. INSERT INTO types_table VALUES (123.45, '12-10-25 12:32:10 +01:00', '2010-11-12 13:14:15.1234567', '11:12:13', 1, 0);