dimanche 30 novembre 2014

SQL developer question


Use IF and WHILE to insert 100,000 records into the following table. Place your Database script here that generates the following result.



CREATE TABLE [dbo].[cs110](
[ID] int NOT NULL IDENTITY (1, 1),
[lastname] [varchar](50) NOT NULL,
[firstname] [varchar](50) NOT NULL,
[number] int NOT NULL
)
GO
SELECT * FROM [dbo].[cs110]

a) Run the above script to create a table, so you can add records.

b) Insert your last name, first name and number. The number MUST increment by 100 on every additional 100 record. For example, look below.
First 100 records (1 - 100) Insert 100
Next 100 records (101 - 200) Insert 200
Next 100 records (201 - 300) Insert 300
Next 100 records (301 - 400) Insert 400
...
Continue until you have inserted 100,000 records




Aucun commentaire:

Enregistrer un commentaire