I am learning DATA mining ...


  • Hello,

    I am learning data warehousing and I want to write a script that will create a database, create a table, load data in to the table and then delete the entire database ...

    can you please help viki ...

    create database viki
    create table viki (id int, name varchar(10))
    insert into viki values(007, 'vikistupidbitch')
    use viki
    select * from viki
    packages or packets ...
    use master

    alter database viki set offline with rollback immediate
    drop database viki

    • Moved by Olaf HelperMVP Sunday, August 18, 2013 1:48 PM Moved from "SQl Database Engine" to a more related forum for a better response
    Sunday, August 18, 2013 10:41 AM


All replies

  • I suggest you use a TABLE variable:

    DECLARE @viki TABLE(id int, name varchar(20))
    insert into @viki values(007, 'vikistupidbitch')
    select * from @viki

    • Edited by dsmwb Sunday, August 18, 2013 1:59 PM
    Sunday, August 18, 2013 11:59 AM
  • If you need sample database, refer this link:

    Microsoft SQL Server Product Samples

    The most important motivation for the research work that resulted in the relational model was the objective of providing a sharp and clear boundary between the logical and physical aspects of database management. - E. F. Codd

    My blog

    Sunday, August 18, 2013 2:21 PM