php-sqlsrv/test/setup/168256.sql
ulvii 41af6fc0a2 Database setup (#367)
* porting database setup files for functional tests

* Updating yml files to setup test databases before running the tests

* update spacing

* Renaming env variables

* Modifying cleanup_dbs.py and setup_dbs.py scripts so that they can execute database setup files

* update env variables

* Fix typo

* Update .travis.yml

* update env variables

* update travis scripts

* Checking sqlcmd setup on travis

* Checking sqlcmd setup on travis

* sqlcmd bcp fix

* sqlcmd bcp fix

* sqlcmd bcp fix

* sqlcmd bcp fix

* sqlcmd bcp fix

* sqlcmd bcp fix

* sqlcmd bcp fix

* sqlcmd bcp fix

* sqlcmd bcp fix

* Adding a test to make sure the database is setup properly

* update exec_sql_scripts.py

* update sqlsrv_num_fields.phpt

* update sqlsrv_num_fields.phpt

* update

* Fixing identation
2017-05-01 11:20:53 -07:00

25 lines
738 B
Transact-SQL

USE $(dbname)
GO
IF EXISTS (SELECT * FROM sys.objects
WHERE object_id = OBJECT_ID(N'[dbo].[168256]') AND type in (N'U'))
BEGIN
DROP TABLE [168256]
END
GO
CREATE TABLE [168256] (
[SalesOrderID] [int] NOT NULL,
[SalesOrderDetailID] [int] IDENTITY(1,1) NOT NULL,
[CarrierTrackingNumber] [nvarchar](25) NULL,
[OrderQty] [smallint] NOT NULL,
[ProductID] [int] NOT NULL,
[SpecialOfferID] [int] NOT NULL,
[UnitPrice] [money] NOT NULL,
[UnitPriceDiscount] [money] NOT NULL DEFAULT ((0.0)),
[LineTotal] AS (isnull(([UnitPrice]*((1.0)-[UnitPriceDiscount]))*[OrderQty],(0.0))),
[rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL DEFAULT (newid()),
[ModifiedDate] [datetime] NOT NULL DEFAULT (getdate()));
GO