studygolang.xml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <sqlMap>
  2. <sql id="selectAllArticle">
  3. select id,title,createdatetime,content
  4. from Article where id in (?1,?2)
  5. </sql>
  6. <sql id="selectStudentById1">
  7. select * from user where id=?id and 1=1
  8. </sql>
  9. <sql id="sql_2_1">
  10. select id,title,createdatetime,content from Article where id = ?id
  11. </sql>
  12. <sql id="sql_i_1">
  13. INSERT INTO categories VALUES (?id, ?name, ?counts, ?orders, ?pid)
  14. </sql>
  15. <sql id="sql_i_2">
  16. INSERT INTO categories VALUES (?id, ?name, ?counts, ?orders, ?pid)
  17. </sql>
  18. <sql id="category">
  19. select * from category
  20. </sql>
  21. <sql id="category-16-17">
  22. select * from category where id in (16,17)
  23. </sql>
  24. <sql id="create_1">
  25. <![CDATA[
  26. DROP TABLE IF EXISTS "public"."categories11";
  27. CREATE TABLE "public"."categories11" (
  28. "id" int4 NOT NULL,
  29. "name" varchar(200) COLLATE "default" NOT NULL,
  30. "counts" int4 NOT NULL,
  31. "orders" int4 NOT NULL,
  32. "pid" int4 NOT NULL
  33. )
  34. WITH (OIDS=FALSE)
  35. ;
  36. -- ----------------------------
  37. -- Records of categories
  38. -- ----------------------------
  39. INSERT INTO "public"."categories11" VALUES ('16', 'aaa', '1', '1', '1');
  40. INSERT INTO "public"."categories11" VALUES ('17', 'xxx', '1', '1', '1');
  41. -- ----------------------------
  42. -- Alter Sequences Owned By
  43. -- ----------------------------
  44. -- ----------------------------
  45. -- Primary Key structure for table categories
  46. -- ----------------------------
  47. ALTER TABLE "public"."categories11" ADD PRIMARY KEY ("id");
  48. ]]>
  49. </sql>
  50. </sqlMap>