quoting.slt 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. mode cockroach
  10. statement ok
  11. CREATE TABLE t (
  12. v integer
  13. )
  14. statement ok
  15. INSERT INTO t VALUES
  16. (1),
  17. (2)
  18. statement ok
  19. INSERT INTO "t" VALUES
  20. (3)
  21. query I
  22. SELECT * FROM "t" ORDER BY v
  23. ----
  24. 1
  25. 2
  26. 3
  27. query I
  28. SELECT * FROM t ORDER BY "v"
  29. ----
  30. 1
  31. 2
  32. 3
  33. query T
  34. SELECT count(*) AS "count" FROM t
  35. ----
  36. 3
  37. query T
  38. SELECT count(*) AS count FROM "t"
  39. ----
  40. 3
  41. query T
  42. SELECT count(*) AS "count" FROM "t"
  43. ----
  44. 3
  45. # quoted creation
  46. statement ok
  47. CREATE TABLE "q" (
  48. "p" integer
  49. )
  50. statement ok
  51. INSERT INTO q VALUES
  52. (1),
  53. (2)
  54. statement ok
  55. INSERT INTO "q" VALUES
  56. (3)
  57. query I
  58. SELECT * FROM "q" ORDER BY p
  59. ----
  60. 1
  61. 2
  62. 3
  63. query I
  64. SELECT * FROM q ORDER BY "p"
  65. ----
  66. 1
  67. 2
  68. 3
  69. query T
  70. SELECT count(*) AS "count" FROM q
  71. ----
  72. 3
  73. query T
  74. SELECT count(*) AS count FROM "q"
  75. ----
  76. 3
  77. query T
  78. SELECT count(*) AS "count" FROM "q"
  79. ----
  80. 3