Replace CHAR for VARCHAR
authorBoris Villazon-Terrazas <bvillazon@fi.upm.es>
Mon, 27 Feb 2012 18:27:47 +0100
changeset 52 6f3784e16482
parent 51 782d18996917
child 53 647bd29abe11
Replace CHAR for VARCHAR
D005-1table3columns3rows2duplicates/create.sql
D010-1table1primarykey3colums3rows/create.sql
D012-2tables2duplicates0nulls/create.sql
D015-1table3columns1composityeprimarykey3rows2languages/create.sql
D017-I18NnoSpecialChars/create.sql
ts1.zip
--- a/D005-1table3columns3rows2duplicates/create.sql	Mon Feb 27 17:50:31 2012 +0100
+++ b/D005-1table3columns3rows2duplicates/create.sql	Mon Feb 27 18:27:47 2012 +0100
@@ -1,6 +1,6 @@
 CREATE TABLE "IOUs" (
-      "fname" CHAR(20),
-      "lname"  CHAR(20),
+      "fname" VARCHAR(20),
+      "lname"  VARCHAR(20),
       "amount" FLOAT);
 INSERT INTO "IOUs" ("fname", "lname", "amount") VALUES ('Bob', 'Smith', 30);
 INSERT INTO "IOUs" ("fname", "lname", "amount") VALUES ('Sue', 'Jones', 20);
--- a/D010-1table1primarykey3colums3rows/create.sql	Mon Feb 27 17:50:31 2012 +0100
+++ b/D010-1table1primarykey3colums3rows/create.sql	Mon Feb 27 18:27:47 2012 +0100
@@ -1,7 +1,7 @@
 CREATE TABLE "Country Info" (
   "Country Code" INTEGER PRIMARY KEY,
-  "Name" CHAR(100),
-  "ISO 3166" CHAR(10)
+  "Name" VARCHAR(100),
+  "ISO 3166" VARCHAR(10)
 );
 INSERT INTO "Country Info" ("Country Code", "Name", "ISO 3166") VALUES (1, 'Bolivia, Plurinational State of', 'BO');
 INSERT INTO "Country Info" ("Country Code", "Name", "ISO 3166") VALUES (2, 'Ireland', 'IE');
--- a/D012-2tables2duplicates0nulls/create.sql	Mon Feb 27 17:50:31 2012 +0100
+++ b/D012-2tables2duplicates0nulls/create.sql	Mon Feb 27 18:27:47 2012 +0100
@@ -1,14 +1,14 @@
 CREATE TABLE "IOUs" (
-      "fname" CHAR(20),
-      "lname" CHAR(20),
+      "fname" VARCHAR(20),
+      "lname" VARCHAR(20),
       "amount" FLOAT);
 INSERT INTO "IOUs" ("fname", "lname", "amount") VALUES ('Bob', 'Smith', 30);
 INSERT INTO "IOUs" ("fname", "lname", "amount") VALUES ('Sue', 'Jones', 20);
 INSERT INTO "IOUs" ("fname", "lname", "amount") VALUES ('Bob', 'Smith', 30);
 CREATE TABLE "Lives" (
-      "fname" CHAR(20),
-      "lname" CHAR(20),
-      "city" CHAR(20));
+      "fname" VARCHAR(20),
+      "lname" VARCHAR(20),
+      "city" VARCHAR(20));
 INSERT INTO "Lives" ("fname", "lname", "city") VALUES ('Bob', 'Smith', 'London');
 INSERT INTO "Lives" ("fname", "lname", "city") VALUES ('Sue', 'Jones', 'Madrid');
 INSERT INTO "Lives" ("fname", "lname", "city") VALUES ('Bob', 'Smith', 'London');
\ No newline at end of file
--- a/D015-1table3columns1composityeprimarykey3rows2languages/create.sql	Mon Feb 27 17:50:31 2012 +0100
+++ b/D015-1table3columns1composityeprimarykey3rows2languages/create.sql	Mon Feb 27 18:27:47 2012 +0100
@@ -1,7 +1,7 @@
 CREATE TABLE "Country" (
-  "Code" CHAR(2),
-  "Name" CHAR(100),
-  "Lan" CHAR(10),
+  "Code" VARCHAR(2),
+  "Name" VARCHAR(100),
+  "Lan" VARCHAR(10),
   PRIMARY KEY ("Code","Lan")
 );
 INSERT INTO "Country" ("Code", "Name", "Lan") VALUES ('BO', 'Bolivia, Plurinational State of', 'EN');
--- a/D017-I18NnoSpecialChars/create.sql	Mon Feb 27 17:50:31 2012 +0100
+++ b/D017-I18NnoSpecialChars/create.sql	Mon Feb 27 18:27:47 2012 +0100
@@ -1,15 +1,15 @@
 CREATE TABLE "植物" (
-  "名" CHAR(10),
-  "使用部" CHAR(10),
-  "条件" CHAR(10),
+  "名" VARCHAR(10),
+  "使用部" VARCHAR(10),
+  "条件" VARCHAR(10),
   PRIMARY KEY ("名", "使用部")
 );
 INSERT INTO "植物" ("名", "使用部", "条件") VALUES ('しそ', '葉', '新鮮な');
 
 CREATE TABLE "成分" (
-  "皿"  CHAR(10),
-  "植物名" CHAR(10),
-  "使用部" CHAR(10),
+  "皿"  VARCHAR(10),
+  "植物名" VARCHAR(10),
+  "使用部" VARCHAR(10),
   FOREIGN KEY ("植物名", "使用部") REFERENCES "植物"("名", "使用部")
 );
 INSERT INTO "成分" ("皿", "植物名", "使用部") VALUES ('しそのとまと', 'しそ', '葉');
\ No newline at end of file
Binary file ts1.zip has changed