我有一個SQL問題,並嘗試了多種組合無濟於事。我已經嘗試過逗號和分號,在前兩個之後),所有三個),所有這些都只是最後一個)。沒有這樣的運氣。請幫我修復查詢。提前致謝!sql修改文件語句
我已經做了盡職調查,並在多個網站來(我只能職位,因爲reputatoin的兩個鏈接),這些: Create database using script at the default path? http://www.sqlteam.com/forums/topic.asp?topic_id=148732
USE master
GO
ALTER DATABASE location_cust_db
MODIFY FILE
(
NAME = location_cust_db_data1,
MAXSIZE = UNLIMITED,
)
(
NAME = location_cust_db_data2,
MAXSIZE = UNLIMITED,
)
(
NAME = location_cust_db_data3,
MAXSIZE = UNLIMITED,
)
GO
USE master
GO
ALTER DATABASE location_cust_db
MODIFY FILE (NAME = location_cust_db_data1, MAXSIZE = UNLIMITED)
MODIFY FILE (NAME = location_cust_db_data2, MAXSIZE = UNLIMITED)
MODIFY FILE (NAME = location_cust_db_data3, MAXSIZE = UNLIMITED)
GO
這工作,但做20個文件非常繁瑣。
USE master
GO
ALTER DATABASE location_cust_db
MODIFY FILE
(NAME = location_cust_db_data1,
MAXSIZE = UNLIMITED)
USE master
GO
ALTER DATABASE location_cust_db
MODIFY FILE
(NAME = location_cust_db_data2,
MAXSIZE = UNLIMITED)
GO
USE master
GO
ALTER DATABASE location_cust_db
MODIFY FILE
(NAME = location_cust_db_data3,
MAXSIZE = UNLIMITED)
GO
bewa exec()命令的執行將會很危險並且非常有用 – 2013-07-03 19:49:04