This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT OBJECT_NAME(object_id), OBJECT_DEFINITION(object_id) | |
FROM sys.procedures | |
WHERE OBJECT_DEFINITION(object_id) LIKE '%์ฐพ์ ๋ด์ฉ%' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
SP์ถ์ถ | |
*/ | |
--๋ณ์ | |
DECLARE @SqlVersion AS CHAR(4) | |
DECLARE @maxi AS INT , @maxj AS INT | |
DECLARE @i AS INT , @j AS INT | |
DECLARE @Output VARCHAR(4000),@description VARCHAR(4000) | |
CREATE TABLE #Tables (id int identity(1, 1), Object_id int, name varchar(155), type varchar(20), [definition] varchar(MAX)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- procedure ์์์ decrypt | |
DBO.UF_DEC_MRM(ํด๋์ ํ๋ฒํธ) | |
CONVERT(VARCHAR(100), DECRYPTBYKEY(ํด๋์ ํ๋ฒํธ)) | |
-- SDA ์๋ฃ๋ถ์ ์์ฑ์ parameter ์ ๊ฑฐ | |
@DataSection1 VARCHAR(50) = NULL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Delete Remote Branch | |
git push origin --delete <branch_name> | |
git push origin :<branch_name> | |
# To list all unstaged tracked changed files | |
git diff --name-only | |
# To list all staged tracked changed files | |
git diff --name-only --staged |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- ref. http://mkklab.tistory.com/7 | |
-- Microsoft SQL Server Management Studio์์ ์ง์ ์คํํ๋ ์ฟผ๋ฆฌ๋ค๋ง ๋ณด์ฌ์ค๋ค. | |
SELECT | |
db_name(st.dbid) DBName, | |
object_schema_name(objectid, st.dbid) SchemaName, | |
object_name(objectid, st.dbid) SPName, | |
qs.total_elapsed_time, | |
creation_time, | |
last_execution_time, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- ref. https://msdn.microsoft.com/ko-kr/library/ms176007(v=sql.90).aspx | |
-- ref. sys.sql_dependencies | |
-- object์ ์ ์ | |
exec sp_helptext N'NAME' | |
-- object์ ์ข ์์ฑ ์ ๋ณด in current DB | |
exec sp_depends N'NAME' | |
-- view์ ๋ฉํ๋ฐ์ดํฐ ์ ๋ฐ์ดํธ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT DISTINCT 'EXEC sp_refreshview ''' + name + '''' | |
FROM sys.objects so INNER JOIN sys.sql_dependencies sd | |
ON so.object_id = sd.object_id | |
WHERE type = 'V' | |
AND sd.referenced_major_id = object_id('OBJECT_NAME') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- https://docs.microsoft.com/ko-kr/sql/t-sql/functions/cast-and-convert-transact-sql#date-and-time-styles | |
SELECT CONVERT(VARCHAR, GETDATE(), 120) | |
-- ์ง์ ๋ ๋ ๋ ์ง๋ฅผ ๋ํ์ฌ ์ ๋ ์ง๋ฅผ ๋ฐํํ๋ค. | |
SELECT DATENAME(๋ ์ง๋ถ๋ถ, ๋ ์ง) | |
-- ๋ ๋ ์ง ์ฌ์ด์ ๊ฐ๊ฒฉ์ ๊ณ์ฐํ์ฌ ์ง์ ๋ ๋จ์(์๊ฐ, ์ผ, ์ฃผ ๋ฑ)๋ก ๋ฐํํ๋ค. | |
SELECT DATEDIFF(๋ ์ง๋ถ๋ถ,์์๋ ์ง, ์ข ๋ฃ๋ ์ง) | |
-- ์ง์ ํ ๋ ์ง ๋ถ๋ถ์ ๋ฌธ์์ด๋ก ๋ฐํํ๋ค. |