daily pastebin goal
42%
SHARE
TWEET

Untitled

a guest May 16th, 2018 114 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. USE master
  2. GO
  3. if exists (select * from sysdatabases where name='ships')
  4.     DROP DATABASE ships
  5. GO
  6.  
  7. CREATE DATABASE ships
  8. GO
  9. USE ships
  10. GO
  11.  
  12. ----- Tables -----
  13. CREATE TABLE BATTLES (
  14.  NAME VARCHAR(20) ,
  15.  DATE DATETIME
  16. );
  17.  
  18. CREATE TABLE CLASSES(
  19.  CLASS VARCHAR(50) ,
  20.  TYPE VARCHAR(2) ,
  21.  COUNTRY VARCHAR (20) ,
  22.  NUMGUNS INT,
  23.  BORE REAL,
  24.  DISPLACEMENT INT
  25. );
  26.  
  27. CREATE TABLE SHIPS(
  28.  NAME VARCHAR(50) ,
  29.  CLASS VARCHAR(50) ,
  30.  LAUNCHED INT
  31. );
  32.  
  33. CREATE TABLE OUTCOMES(
  34.  SHIP VARCHAR(50) ,
  35.  BATTLE VARCHAR(20) ,
  36.  RESULT VARCHAR(10)
  37. );
  38.  
  39. ----- Classes -----
  40. INSERT INTO CLASSES
  41.   VALUES ('Bismarck', 'bb', 'Germany', 8, 15, 42000);
  42.  
  43. INSERT INTO CLASSES
  44.   VALUES ('Iowa', 'bb', 'USA', 9, 16, 46000);
  45.  
  46. INSERT INTO CLASSES
  47.   VALUES ('Kongo', 'bc', 'Japan', 8, 14, 32000);
  48.  
  49. INSERT INTO CLASSES
  50.   VALUES ('North Carolina', 'bb', 'USA', 12, 16, 37000);
  51.  
  52. INSERT INTO CLASSES
  53.   VALUES ('Renown', 'bc', 'Gt.Britain', 6, 15, 32000);
  54.  
  55. INSERT INTO CLASSES
  56.   VALUES ('Revenge', 'bb', 'Gt.Britain', 8, 15, 29000);
  57.  
  58. INSERT INTO CLASSES
  59.   VALUES ('Tennessee', 'bb', 'USA', 12, 14, 32000);
  60.  
  61. INSERT INTO CLASSES
  62.   VALUES ('Yamato', 'bb', 'Japan', 9, 18, 65000);
  63.  
  64. ----- Battles -----
  65. INSERT INTO BATTLES
  66.   VALUES ('Guadalcanal', '1942-11-15');
  67.  
  68. INSERT INTO BATTLES
  69.   VALUES ('North Atlantic', '1941-05-25');
  70.  
  71. INSERT INTO BATTLES
  72.   VALUES ('North Cape', '1943-12-26');
  73.  
  74. INSERT INTO BATTLES
  75.   VALUES ('Surigao Strait', '1944-10-25');
  76.  
  77. ----- Ships -----
  78. INSERT INTO SHIPS
  79.   VALUES ('California', 'Tennessee', 1921);
  80.  
  81. INSERT INTO SHIPS
  82.   VALUES ('Haruna', 'Kongo', 1916);
  83.  
  84. INSERT INTO SHIPS
  85.   VALUES ('Hiei', 'Kongo', 1914);
  86.  
  87. INSERT INTO SHIPS
  88.   VALUES ('Iowa', 'Iowa', 1943);
  89.  
  90. INSERT INTO SHIPS
  91.   VALUES ('Kirishima', 'Kongo', 1915);
  92.  
  93. INSERT INTO SHIPS
  94.   VALUES ('Kongo', 'Kongo', 1913);
  95.  
  96. INSERT INTO SHIPS
  97.   VALUES ('Missouri', 'Iowa', 1944);
  98.  
  99. INSERT INTO SHIPS
  100.   VALUES ('Musashi', 'Yamato', 1942);
  101.  
  102. INSERT INTO SHIPS
  103.   VALUES ('New Jersey', 'Iowa', 1943);
  104.  
  105. INSERT INTO SHIPS
  106.   VALUES ('North Carolina', 'North Carolina', 1941);
  107.  
  108. INSERT INTO SHIPS
  109.   VALUES ('Ramillies', 'Revenge', 1917);
  110.  
  111. INSERT INTO SHIPS
  112.   VALUES ('Renown', 'Renown', 1916);
  113.  
  114. INSERT INTO SHIPS
  115.   VALUES ('Repulse', 'Renown', 1916);
  116.  
  117. INSERT INTO SHIPS
  118.   VALUES ('Resolution', 'Renown', 1916);
  119.  
  120. INSERT INTO SHIPS
  121.   VALUES ('Revenge', 'Revenge', 1916);
  122.  
  123. INSERT INTO SHIPS
  124.   VALUES ('Royal Oak', 'Revenge', 1916);
  125.  
  126. INSERT INTO SHIPS
  127.   VALUES ('Royal Sovereign', 'Revenge', 1916);
  128.  
  129. INSERT INTO SHIPS
  130.   VALUES ('Tennessee', 'Tennessee', 1920);
  131.  
  132. INSERT INTO SHIPS
  133.   VALUES ('Washington', 'North Carolina', 1941);
  134.  
  135. INSERT INTO SHIPS
  136.   VALUES ('Wisconsin', 'Iowa', 1944);
  137.  
  138. INSERT INTO SHIPS
  139.   VALUES ('Yamato', 'Yamato', 1941);
  140.  
  141. INSERT INTO SHIPS
  142.   VALUES ('Yamashiro', 'Yamato', 1947);
  143.  
  144. INSERT INTO SHIPS
  145.   VALUES ('South Dakota', 'North Carolina', 1941);
  146.  
  147. INSERT INTO SHIPS
  148.   VALUES ('Bismarck', 'North Carolina', 1911);
  149.  
  150. INSERT INTO SHIPS
  151.   VALUES ('Duke of York', 'Renown', 1916);
  152.  
  153. INSERT INTO SHIPS
  154.   VALUES ('Fuso', 'Iowa', 1940);
  155.  
  156. INSERT INTO SHIPS
  157.   VALUES ('Hood', 'Iowa', 1942);
  158.  
  159. INSERT INTO SHIPS
  160.   VALUES ('Rodney', 'Yamato', 1915);
  161.  
  162. INSERT INTO SHIPS
  163.   VALUES ('Yanashiro', 'Yamato', 1918);
  164.  
  165. INSERT INTO SHIPS
  166.   VALUES ('Schamhorst', 'North Carolina', 1917);
  167.  
  168. INSERT INTO SHIPS
  169.   VALUES ('Prince of Wales', 'North Carolina', 1937);
  170.  
  171. INSERT INTO SHIPS
  172.   VALUES ('King George V', 'Iowa', 1942);
  173.  
  174. INSERT INTO SHIPS
  175.   VALUES ('West Virginia', 'Iowa', 1942);
  176.  
  177. ----- Outcomes -----
  178. INSERT INTO OUTCOMES
  179.   VALUES ('Bismarck', 'North Atlantic', 'sunk');
  180.  
  181. INSERT INTO OUTCOMES
  182.   VALUES ('California', 'Surigao Strait', 'ok');
  183.  
  184. INSERT INTO OUTCOMES
  185.   VALUES ('Duke of York', 'North Cape', 'ok');
  186.  
  187. INSERT INTO OUTCOMES
  188.   VALUES ('Fuso', 'Surigao Strait', 'sunk');
  189.  
  190. INSERT INTO OUTCOMES
  191.   VALUES ('Hood', 'North Atlantic', 'sunk');
  192.  
  193. INSERT INTO OUTCOMES
  194.   VALUES ('King George V', 'North Atlantic', 'ok');
  195.  
  196. INSERT INTO OUTCOMES
  197.   VALUES ('Kirishima', 'Guadalcanal', 'sunk');
  198.  
  199. INSERT INTO OUTCOMES
  200.   VALUES ('Prince of Wales', 'North Atlantic', 'damaged');
  201.  
  202. INSERT INTO OUTCOMES
  203.   VALUES ('Rodney', 'North Atlantic', 'ok');
  204.  
  205. INSERT INTO OUTCOMES
  206.   VALUES ('Schamhorst', 'North Cape', 'sunk');
  207.  
  208. INSERT INTO OUTCOMES
  209.   VALUES ('South Dakota', 'Guadalcanal', 'damaged');
  210.  
  211. INSERT INTO OUTCOMES
  212.   VALUES ('Tennessee', 'Surigao Strait', 'ok');
  213.  
  214. INSERT INTO OUTCOMES
  215.   VALUES ('Washington', 'Guadalcanal', 'ok');
  216.  
  217. INSERT INTO OUTCOMES
  218.   VALUES ('West Virginia', 'Surigao Strait', 'ok');
  219.  
  220. INSERT INTO OUTCOMES
  221.   VALUES ('Yamashiro', 'Surigao Strait', 'sunk');
  222.  
  223. INSERT INTO OUTCOMES
  224.   VALUES ('California', 'Guadalcanal', 'damaged');
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top