home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2005 June (DVD) / DPPRO0605DVD.iso / dotNETSDK / SETUP.EXE / netfxsd1.cab / TxDB_sql_1________.3643236F_FC70_11D3_A536_0090278A1BB8 < prev    next >
Encoding:
Text File  |  2001-08-21  |  543 b   |  28 lines

  1. USE master
  2.  
  3. /* If a database already exists, remove it */
  4. IF EXISTS (SELECT * FROM sysdatabases WHERE name='TXDemoDB')
  5.  
  6. BEGIN
  7.   raiserror('Dropping existing TXDemoDB database ....',0,1)
  8.   DROP database TXDemoDB
  9. END
  10. GO
  11.  
  12. /* Create the database */
  13. CREATE DATABASE TXDemoDB
  14. GO
  15.  
  16. /* Select the just created database */
  17. use TXDemoDB
  18. GO
  19.  
  20. /* Create the table */
  21. CREATE TABLE currentValue (
  22.     currentValue int NOT NULL 
  23. )
  24. GO
  25.  
  26. /* insert the default value 10 into the table */
  27. INSERT INTO currentValue(currentValue) VALUES(10)
  28. GO