DEFINITIONS

Definitions More Info.
Definition ID455
TitleSQL
CategoryNOTES
DefinitionTEST DATABASE-TABLO-VIEW VE DATALARI
Definition DescriptionUSE [YUKSEL] GO /****** Object: Table [dbo].[prestige] Script Date: 25.03.2014 23:11:05 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO CREATE TABLE [dbo].[prestige]( [KitapNo] [int] NOT NULL, [ad] [varchar](50) NULL, [fiyat] [money] NULL, [sayfa] [int] NULL, [tarih] [datetime] NULL, [yazar] [nvarchar](50) NULL, PRIMARY KEY CLUSTERED ( [KitapNo] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO SET ANSI_PADDING OFF GO DATALAR insert into prestige values(12,'VBasic2003',40.00,1000,'2004-05-22 00:00:00.000','yuksel-nihat' ) insert into prestige values(13,'Excel2003',22.50,550,'2004-06-26 00:00:00.000','nihat-yuksel') insert into prestige values(14,'J#2005',25.00,500,'2004-12-12 00:00:00.000','nihat-yuksel' ) insert into prestige values(15,'Word2003',22.50,300,'2005-01-17 00:00:00.000','yuksel-nihat' ) insert into prestige values(16,'Office2003',35.00,1100,'2005-02-18 00:00:00.000','yuksel-nihat' ) insert into prestige values(17,'Delphi9',25.00,600,'2005-04-17 00:00:00.000','nihat-yuksel' ) insert into prestige values(18,'Delphi9DB',22.50,450,'2005-05-17 00:00:00.000','nihat-yuksel' ) insert into prestige values(19,'FreehandMX',11.00,150,'2005-06-17 00:00:00.000','gurcan' ) insert into prestige values(20,'DreamweaverMX',11.00,140,'2005-06-19 00:00:00.000','gurcan' ) insert into prestige values(21,'Autocad2004',20.00,300,'2005-07-05 00:00:00.000','irfan' ) insert into prestige values(22,'ASP.NET2005',35.00,800,'2005-08-15 00:00:00.000','yuksel-nihat' ) insert into prestige values(23,'SQLServer2005',40.00,1000,'2005-09-15 00:00:00.000','yuksel-nihat' ) insert into prestige values(30,'pembedizi',15.30,600,'2009-01-01 00:00:00.000','hasan' ) --truncate table prestige use yuksel if exists (select * from sysobjects where type = 'U' and name = 'musteri') drop table musteri if exists (select * from sysobjects where type = 'V' and name='musteri_View') drop view musteri_view go -- MUSTERI TABLOSU create table musteri ( musteri_no int not null, ad char(10) not null, adres char(15) not null ) go create view musteri_view as select musteri_no, ad from musteri go insert into musteri values(01,'final','istanbul') insert into musteri values(02,'seçkin','ankara') insert into musteri values(03,'akmar','istanbul') insert into musteri values(04,'dost','ankara') insert into musteri values(05,'kabalcı','istanbul') select * from musteri_view -- CIRO TABLOSU use yuksel2 go create table ciro ( satisno int, personelad nchar(10), urunad nchar(10), fiyat money ) insert into ciro values (1,'yuksel','elma',3.5) insert into ciro values (2,'gorkem','armut',5.45) insert into ciro values (3,'ahmet','elma',2.4) insert into ciro values (4,'yuksel','kiraz',1.45) insert into ciro values (5,'temel','elma',3.45) insert into ciro values (6,'gorkem','kiraz',7.35) insert into ciro values (7,'ahmet','armut',4.45) insert into ciro values (8,'yuksel','armut',4.6) select * from ciro -- Personel Bilgi Tablosu use yuksel2 go create table personelbilgi ( personelad nchar(10), tel nchar(10), adres nchar(10) ) go insert into personelbilgi values('yuksel','3333333','Kadıköy') insert into personelbilgi values('gorkem','4444444','Kadıköy') insert into personelbilgi values('temel','5555555','Üsküdar') insert into personelbilgi values('ahmet','6666666','Şişli')
RecordBycunay
Record Date25-03-2014 23:11:42
Düzenle
Kopyala
Sil