SHARE
TWEET

Untitled

a guest Dec 8th, 2019 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. use master;
  2. go
  3. if DB_ID (N'lab12') is not null
  4. drop database lab12;
  5. go
  6. create database lab12
  7. on (
  8. NAME = lab12dat,
  9. FILENAME = 'C:\DB\lab12\lab12dat.mdf',
  10. SIZE = 10,
  11. MAXSIZE = 25,
  12. FILEGROWTH = 5
  13. )
  14. log on (
  15. NAME = lab12log,
  16. FILENAME = 'C:\DB\lab12\lab12log.ldf',
  17. SIZE = 5,
  18. MAXSIZE = 20,
  19. FILEGROWTH = 5
  20. );
  21. go
  22.  
  23. use lab12;
  24. go
  25.  
  26.  
  27. if OBJECT_ID(N'Squad',N'U') is NOT NULL
  28.     DROP TABLE Squad;
  29. go
  30.    
  31. CREATE TABLE Squad (
  32.     Squad_ID int IDENTITY(1,1) PRIMARY KEY,
  33.     Surname char(30) NOT NULL,
  34.     Name char(30) NOT NULL,
  35.     Position char(3),
  36.     Number numeric(2)
  37. );
  38. go
  39.  
  40. INSERT INTO Squad(Surname,Name,Position, Number)
  41. VALUES (N'Аррисабалага',N'Кепа', N'ВРТ', 1),
  42.        (N'Алонсо',N'Маркос', N'ЛЗ', 3),
  43.        (N'Рюдигер',N'Антонио', N'ЦЗ', 2),
  44.        (N'Томори',N'Фикайо', N'ЦЗ', 29),
  45.        (N'Аспиликуэта',N'Сесар', N'ПЗ', 28),
  46.        (N'Канте',N'Н’Голо', N'ЦПЗ', 7),
  47.        (N'Маунт',N'Мейсон', N'ЦАП', 19),
  48.        (N'Абрахам',N'Тэмми', N'ФРВ', 9),
  49.        (N'Пулишич',N'Кристиан', N'ЛФА', 22)
  50. go
  51.  
  52. SELECT * FROM Squad
  53. go
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