MSSql Work Book | UserPreferences |
OPEN testcursor
FETCH NEXT/PRIOR/FIRST/LAST FROM testcursor FETCH RELATIVE 0 FROM testcursor FETCH ABSOLUTE 0 FROM testcursor
UPDATE testtb2 SET test_text ='test' WHERE CURRENT OF testcursor
CLOSE testcursor
DEALLOCATE testcursor
xml Áö¿ø
openxml
EXEC sp_xml_preparedocument @hdoc OUTPUT,
ÀúÀå ÇÁ·Î½ÃÀú - ½Ã½ºÅÛ ÀúÀå ÇÁ·Î½ÃÀú, ·ÎÄà ÀúÀå ÇÁ·Î½ÃÀú, Àӽà ÀúÀå ÇÁ·Î½ÃÀú, È®Àå ÀúÀå ÇÁ·Î½ÃÀú, ¿ø°Ý ÀúÀå ÇÁ·Î½ÃÀú
sp_rename @objname = 'up_test', @newname = 'up_testnew', @objtype = 'object' ; sp À̸§ ¼öÁ¤ sp_depends ; ÀÇÁ¸ °ü°è °Ë»ç
DROP PROCEDURE¸¦ ½ÇÇàÇϸé ÇöÀç db¿¡¼ ÇØ´ç sp¸¦ ã°í, ¾øÀ¸¸é master db¸¦ °Ë»öÇÑ´Ù.
anyÀÇ °æ¿ì 1, allÀÇ °æ¿ì 30º¸´Ù Ä¿¾ß ÇÔ.
(any Å°¿öµå´Â In°ú Ư¼ºÀÌ ºñ½Á)
order by ~ with rollup : ¿ä¾à Áý°è.
with cubeÀÇ °æ¿ì¿¡´Â A -> B ¹æÇâÀ¸·ÎÀÇ ¿ä¾àÁý°è »Ó¸¸ÀÌ ¾Æ´Ï¶ó B -> A ¹æÇâÀ¸·ÎÀÇ ¿ä¾àÁý°èµµ Áö¿øÇÑ´Ù.
ntext, text, image
delete like this ; DELETE books FROM titles WHERE books.title = titles.title AND titles.royalty = 10
truncate table is not LOGGED!
bcp tempdb..testtb out c:\testtb.txt -c -T
bcp tempdb..testtb2 in c:\testtb.txt -c -T
(´ë»ó Å×À̺íÀº ¸¸µé¾îÁ® ÀÖ¾î¾ß ÇÔ)
or
BULK INSERT testtb2
FROM 'c:\testtb.txt'
WITH (DATAFILETYPE = 'char')
* bcp´Â Å×ÀÌºí ´ÜÀ§ÀÇ ´ë·® Insertion¿¡ ÀûÇÕ
linked server ; sp_addlinkedserver or em¿¡¼ ¼¹ö Á¤ÀÇ
Select * From addServer.targetDB.dbo.Table °°Àº ÇüÅ·ΠÁ¢±Ù °¡´É
openquery ; Select * From OPENQUERY ( addServer, 'SELECT lastname FROM customer)
ad-hoc query ; openrowset, opendatasource ... oledb¸¸ Àû¿ë °¡´É
Ä÷³ÀÇ Á¤ÀÇ ; Default, Identity, (Not) Null, Check, Rule, Trigger, Index
ruleÀº ÀÌÀü ȣȯ¼ºÀ» À§ÇÑ °´Ã¼
master tempdb msdb model
page 8kb - header 96 bytes
extent 64kb - table, index's default unit.
mixed extent -> 8 pages over : regular extent
mdf master data file
ndf
ldf log data file
GAM global allocation map - process 4gb (64000 extents) 1 is unallocated, 0 is allocated.
SGAM shared global allocation map - process 4gb (64000 extents) 1 is mixed, and could be allocated, 0 is not mixed extent, or allocated.
table type data stream - protocol ; sql2000 - 8.0, sql7.0 - 7.0, sql6.5, 6.0, 4.21 - 4.2
transaction log
awe address windowing extensions - advanced server 8gb, datacenter serve 64gb ; È®Àå ¸Þ¸ð¸®´Â °¢ ÀνºÅϽº¿¡ Á¤ÀûÀ¸·Î ÇÒ´çµÊ
data definition language
data manipulate language
data control language
sql-dmf distributed manage framework
automation : server agent, jobs, event and warning, trigger, manager?
import/export : dts, replication, bulkcopy(bcp), distributed query
dbcc database
sp_helpdb
sp_dboption
sp_configure
model databaseÀÇ ¿É¼ÇÀÌ »õ µ¥ÀÌÅͺ£À̽ºÀÇ ¼³Á¤¿¡ Àû¿ëµÊ.
¿ÀÈÄ 12:00 2004-09-13, p.280
where - any/some, all Å°¿öµå
a > any ( select 1 union select 5 union select 30 )
a > all ( select 1 union select 5 union select 30 )
; ado - appendchunk·Î ¼öÁ¤
; oledb - ISequentialStream? ÀÎÅÍÆäÀ̽º·Î »õ °ªÀ» ¾µ ¼ö ÀÖÀ½
; odbc - sqlpudataÀÇ data-at-execution ÆûÀ» »ç¿ë °¡´É
; db-library ¾îÇÃÀº dbwritetext ÇÔ¼ö¸¦ »ç¿ë, ¼öÁ¤Àº dbupdatetext ÇÔ¼ö
; t-sql - updatetext ±¸¹® »ç¿ë
delete, api, cursor, truncate table ; rowsetÀ» »èÁ¦ÇÒ ¼ö ÀÖ´Â ±¸¹®µé
SELECT * FROM OPENROWSET
('Microsoft.jet.oledb.4.0', 'c:\testdb.mdb';'admin';' ', customer) as c
SELECT * FROM OPENDATASOURCE
('Microsoft.jet.oledb.4.0', 'Data Source = c:\testdb.mdb; User ID=admin; Password=')...customer as c
¿ÀÈÄ 2:02 2004-09-09, p.210
decimal - À¯È¿ 38ÀÚ¸®. numeric°ú µ¿ÀÏ
float - -1.79e +308 ~ 1.79e +308, float(53)ÀÇ °æ¿ì double precision°ú µ¿ÀÏ
real - float(24)¿Í µ¿ÀÏ, -3.40e+38 3.40e+38
float(n)
n = 1~24, Á¤¹Ðµµ 7ÀÚ¸®, 4byte
n = 25~53, Á¤¹Ðµµ 15ÀÚ¸®, 8byte
money - -2^63 / 10^(-4) ~ (2^63-1) / 10^(-4), 8byte. (¼Ò¼öÁ¡ÀÌ µé¾î°£´Ù!) ¿ÀÀü 11:16 2004-09-08
replication : publish - subscribe °Ô½Ã - ±¸µ¶
OLAP online analytical processing
OLTP online transaction processing
metadata service - manipulates system catalog
dts data transformation service
dtc distributed transaction coordinator
ÇÁ·Î±×·¡¹ÖºÐ·ù
EditText
of this page
(last modified 2004-09-14 16:53:59)
FindPage
by browsing, searching, or an index
Or try one of these actions:
DeletePage,
DeleteUploadedFile,
LikePages,
SpellCheck,
UploadFile