lunes, 6 de abril de 2015
sentencias SQL importantes Important SQL sentences
ALTER TABLE dbo.NB_Barcode ADD COLUMN
'idNB' INTEGER
ALTER TABLE dbo.NB_Barcode ADD PRIMARY KEY ('idNB')
CREATE TABLE NB_BARCODE
(
idNB INT,
FormId NVARCHAR(64) not null,
FormName NVARCHAR(64) not null,
CONSTRAINT pk_NB_id PRIMARY KEY(idNB)
);
GO
truncate table dbo.NB_Barcode
CREATE TABLE NB_BARCODE
(
idNB INT,
FormId NVARCHAR(64) not null
FormName NVARCHAR(64) not null
CONSTRAINT pk_NB_id PRIMARY KEY(idNB)
);
GO
INSERT INTO tCoches
(matricula,
marca ,
modelo ,
color ,
numero_kilometros)
values
('M1111CA',
'RENAULT',
'MEGANE TR100',
'NEGRO DIAMANTE',
78000);
INSERT INTO dbo.NB_Barcode
(NBid_key,FormId,FormName)
values
(1,'METNB0101','Adult Application Form');
id ,FormId,FormName, ,,,,
INSERT INTO dbo.NB_Barcode
(NBid_key,FormId,FormName)
values (
1,'METNB0101','Adult Application Form')
INSERT INTO dbo.NB_Barcode
(NBid_key,FormId,FormName)
NB_Barcode
truncate table dbo.NB_Barcode
CREATE TABLE CS_BARCODE
(
idCS INT,
FormId NVARCHAR(64) not null
FormName NVARCHAR(64) not null
CONSTRAINT pk_CS_id PRIMARY KEY(idCS)
);
GO
INSERT INTO tCoches
(matricula,
marca ,
modelo ,
color ,
numero_kilometros)
values
('M1111CA',
'RENAULT',
'MEGANE TR100',
'NEGRO DIAMANTE',
78000);
INSERT INTO dbo.NB_Barcode
(NBid_key,FormId,FormName)
values
(1,'METNB0101','Adult Application Form');
id ,FormId,FormName, ,,,,
INSERT INTO dbo.NB_Barcode
(NBid_key,FormId,FormName)
values (
1,'METNB0101','Adult Application Form')
INSERT INTO dbo.NB_Barcode
(NBid_key,FormId,FormName)
values (2,'METNB0201','Juvenile Application Form')
INSERT INTO dbo.NB_Barcode
(NBid_key,FormId,FormName)
values (3,'METNB0301','Adult Medical Form')
INSERT INTO dbo.NB_Barcode
(NBid_key,FormId,FormName)
values (4,'METNB0401','Juvenile Medical Form')
INSERT INTO dbo.NB_Barcode
(NBid_key,FormId,FormName)
values (
5,'METNB0501','Urinalysis Report')
INSERT INTO dbo.NB_Barcode
(NBid_key,FormId,FormName)
values (
6,'METNB0601','Photo ID')
INSERT INTO dbo.NB_Barcode
(NBid_key,FormId,FormName)
values (
7,'METNB0701','Declaration Form')
INSERT INTO dbo.NB_Barcode
(NBid_key,FormId,FormName)
values (
8,'METNB0801','NOC')
INSERT INTO dbo.NB_Barcode
(NBid_key,FormId,FormName)
values (
9,'METNB0901','UND 6')
INSERT INTO dbo.NB_Barcode
(NBid_key,FormId,FormName)
values (
10,'METNB1001','UND-52')
***************
INSERT INTO dbo.NB_Barcode
(NBid_key,FormId,FormName)
values (
11,'METNB1101','UND-54')
INSERT INTO dbo.NB_Barcode
(NBid_key,FormId,FormName)
values (
12,'METNB1201','ECG & X-Ray Evaluation Form')
INSERT INTO dbo.NB_Barcode
(NBid_key,FormId,FormName)
values (
13,'METNB1301','ETT Form')
INSERT INTO dbo.NB_Barcode
(NBid_key,FormId,FormName)
values (
14,'METNB1401','Addi_OL-1')
INSERT INTO dbo.NB_Barcode
(NBid_key,FormId,FormName)
values (
15,'METNB1501','Addi_OL-2')
INSERT INTO dbo.NB_Barcode
(NBid_key,FormId,FormName)
values (
16,'METNB1601','Addi_OL-3')
INSERT INTO dbo.NB_Barcode
(NBid_key,FormId,FormName)
values (
17,'METNB1701','Addi_OL-4')
INSERT INTO dbo.NB_Barcode
(NBid_key,FormId,FormName)
values (
18,'METNB1801','Addi_OL-5')
INSERT INTO dbo.NB_Barcode
(NBid_key,FormId,FormName)
values (
19,'METNB1901','Good Health - app form')
**************
INSERT INTO dbo.NB_Barcode
(NBid_key,FormId,FormName)
values (
20,'METNB2001','My child Special-app form')
INSERT INTO dbo.NB_Barcode
(NBid_key,FormId,FormName)
values (
21,'METNB2101','Medi-guard-app form')
INSERT INTO dbo.NB_Barcode
(NBid_key,FormId,FormName)
values (
22,'METNB2201','COP-app form')
INSERT INTO dbo.NB_Barcode
(NBid_key,FormId,FormName)
values (
23,'METNB2301','CIROP-app form')
INSERT INTO dbo.NB_Barcode
(NBid_key,FormId,FormName)
values (
24,'METNB2401','LTI- app form')
INSERT INTO dbo.NB_Barcode
(NBid_key,FormId,FormName)
values (
25,'METNB2501','Ex_5 app form')
INSERT INTO dbo.NB_Barcode
(NBid_key,FormId,FormName)
values (
26,'METNB2601','Addi-A&H-1')
INSERT INTO dbo.NB_Barcode
(NBid_key,FormId,FormName)
values (
27,'METNB2701','Addi-A&H-2')
No hay comentarios:
Publicar un comentario