예약어(Transact-SQL)Reserved Keywords (Transact-SQL)

적용 대상: 예SQL Server(2008부터) 예Azure SQL Database 예Azure SQL Data Warehouse 예병렬 데이터 웨어하우스 APPLIES TO: yesSQL Server (starting with 2008) yesAzure SQL Database yesAzure SQL Data Warehouse yesParallel Data Warehouse

MicrosoftMicrosoft SQL ServerSQL Server에서는 데이터베이스를 정의, 조작 및 액세스할 때 예약된 키워드를 사용합니다.SQL ServerSQL Server uses reserved keywords for defining, manipulating, and accessing databases. 예약된 키워드는 Transact-SQLTransact-SQL에서 SQL ServerSQL Server 문과 일괄 처리를 구문 분석하고 이해하는 데 사용하는 Transact-SQLTransact-SQL 언어 문법의 일부입니다.Reserved keywords are part of the grammar of the Transact-SQLTransact-SQL language that is used by SQL ServerSQL Server to parse and understand Transact-SQLTransact-SQL statements and batches. 구문상으로는 SQL ServerSQL Server 예약된 키워드를 Transact-SQLTransact-SQL 스크립트에서 식별자와 개체 이름으로 사용할 수 있지만 구분 기호로 분리된 식별자를 사용한 경우에만 가능합니다.Although it is syntactically possible to use SQL ServerSQL Server reserved keywords as identifiers and object names in Transact-SQLTransact-SQL scripts, you can do this only by using delimited identifiers.

다음 표에는 SQL ServerSQL Server 및 Azure SQL Data Warehouse의 예약 키워드가 나와 있습니다.The following table lists SQL ServerSQL Server and Azure SQL Data Warehouse reserved keywords.

ADDADD EXTERNALEXTERNAL PROCEDUREPROCEDURE
ALLALL FETCHFETCH PUBLICPUBLIC
ALTERALTER FILEFILE RAISERRORRAISERROR
ANDAND FILLFACTORFILLFACTOR READREAD
ANYANY FORFOR READTEXTREADTEXT
ASAS FOREIGNFOREIGN RECONFIGURERECONFIGURE
ASCASC FREETEXTFREETEXT REFERENCESREFERENCES
AUTHORIZATIONAUTHORIZATION FREETEXTTABLEFREETEXTTABLE 복제REPLICATION
BACKUPBACKUP FROMFROM RESTORERESTORE
BEGINBEGIN FULLFULL RESTRICTRESTRICT
BETWEENBETWEEN FUNCTIONFUNCTION RETURNRETURN
BREAKBREAK GOTOGOTO REVERTREVERT
BROWSEBROWSE GRANTGRANT REVOKEREVOKE
BULKBULK GROUPGROUP RIGHTRIGHT
BYBY HAVINGHAVING ROLLBACKROLLBACK
CASCADECASCADE HOLDLOCKHOLDLOCK ROWCOUNTROWCOUNT
CASECASE IDENTITYIDENTITY ROWGUIDCOLROWGUIDCOL
CHECKCHECK IDENTITY_INSERTIDENTITY_INSERT RULERULE
CHECKPOINTCHECKPOINT IDENTITYCOLIDENTITYCOL SAVESAVE
CLOSECLOSE IFIF SCHEMASCHEMA
CLUSTEREDCLUSTERED ININ SECURITYAUDITSECURITYAUDIT
COALESCECOALESCE INDEXINDEX SELECTSELECT
COLLATECOLLATE INNERINNER SEMANTICKEYPHRASETABLESEMANTICKEYPHRASETABLE
COLUMNCOLUMN INSERTINSERT SEMANTICSIMILARITYDETAILSTABLESEMANTICSIMILARITYDETAILSTABLE
COMMITCOMMIT INTERSECTINTERSECT SEMANTICSIMILARITYTABLESEMANTICSIMILARITYTABLE
COMPUTECOMPUTE INTOINTO SESSION_USERSESSION_USER
CONSTRAINTCONSTRAINT ISIS SETSET
CONTAINSCONTAINS JOINJOIN SETUSERSETUSER
CONTAINSTABLECONTAINSTABLE KEYKEY SHUTDOWNSHUTDOWN
CONTINUECONTINUE KILLKILL SOMESOME
CONVERTCONVERT LEFTLEFT STATISTICSSTATISTICS
CREATECREATE LIKELIKE SYSTEM_USERSYSTEM_USER
CROSSCROSS LINENOLINENO TABLETABLE
CURRENTCURRENT LOADLOAD TABLESAMPLETABLESAMPLE
CURRENT_DATECURRENT_DATE MERGEMERGE TEXTSIZETEXTSIZE
CURRENT_TIMECURRENT_TIME NATIONALNATIONAL THENTHEN
CURRENT_TIMESTAMPCURRENT_TIMESTAMP NOCHECKNOCHECK TOTO
CURRENT_USERCURRENT_USER NONCLUSTEREDNONCLUSTERED 맨 위로 이동TOP
CURSORCURSOR NOTNOT TRANTRAN
DATABASEDATABASE NULLNULL TRANSACTIONTRANSACTION
DBCCDBCC NULLIFNULLIF TRIGGERTRIGGER
DEALLOCATEDEALLOCATE OFOF TRUNCATETRUNCATE
DECLAREDECLARE OFFOFF TRY_CONVERTTRY_CONVERT
DEFAULTDEFAULT OFFSETSOFFSETS TSEQUALTSEQUAL
DeleteDELETE ONON UNIONUNION
DENYDENY OPENOPEN UNIQUEUNIQUE
DESCDESC OPENDATASOURCEOPENDATASOURCE UNPIVOTUNPIVOT
DISKDISK OPENQUERYOPENQUERY UPDATEUPDATE
DISTINCTDISTINCT OPENROWSETOPENROWSET UPDATETEXTUPDATETEXT
DISTRIBUTEDDISTRIBUTED OPENXMLOPENXML USEUSE
DOUBLEDOUBLE OPTIONOPTION UserUSER
DROPDROP 또는OR VALUESVALUES
DUMPDUMP ORDERORDER VARYINGVARYING
ELSEELSE OUTEROUTER VIEWVIEW
ENDEND OVEROVER WAITFORWAITFOR
ERRLVLERRLVL PERCENTPERCENT WHENWHEN
ESCAPEESCAPE PIVOTPIVOT WHEREWHERE
EXCEPTEXCEPT PLANPLAN WHILEWHILE
EXECEXEC PRECISIONPRECISION 의 모든 멘션을WITH
CREATE 문을 실행하기 전에EXECUTE PRIMARYPRIMARY WITHIN GROUPWITHIN GROUP
EXISTSEXISTS PRINTPRINT WRITETEXTWRITETEXT
EXITEXIT PROCPROC

다음 표에는 Azure SQL Data Warehouse에만 사용되는 예약 키워드가 나와 있습니다.The following table lists reserved keywords that are exclusive to Azure SQL Data Warehouse.

LABELLABEL

또한 ISO 표준에서도 예약된 키워드 목록을 정의합니다.Additionally, the ISO standard defines a list of reserved keywords. ISO 예약된 키워드를 개체 이름과 식별자에 사용하지 마십시오.Avoid using ISO reserved keywords for object names and identifiers. 다음 표에 있는 ODBC 예약된 키워드 목록은 ISO 예약된 키워드 목록과 같습니다.The ODBC reserved keyword list, shown in the following table, is the same as the ISO reserved keyword list.

참고

ISO 표준 예약된 키워드 목록은 SQL ServerSQL Server보다 더 제한적인 경우도 있고 덜 제한적인 경우도 있습니다.The ISO standards reserved keywords list sometimes can be more restrictive than SQL ServerSQL Server and at other times less restrictive. 예를 들어 ISO 예약된 키워드 목록에는 INT가 있습니다.For example, the ISO reserved keywords list contains INT. SQL ServerSQL Server에서는 이것을 예약된 키워드로 구분할 필요가 없습니다.does not have to distinguish this as a reserved keyword.

Transact-SQLTransact-SQL 예약된 키워드는 데이터베이스의 식별자나 이름 또는 데이터베이스 개체(예: 테이블, 열, 뷰 등)로 사용될 수 있습니다.reserved keywords can be used as identifiers or names of databases or database objects, such as tables, columns, views, and so on. 따옴표로 묶인 식별자나 구분 기호로 분리된 식별자를 사용합니다.Use either quoted identifiers or delimited identifiers. 예약된 키워드를 변수 이름과 저장 프로시저 매개 변수로 사용하는 것은 제한되지 않습니다.Using reserved keywords as the names of variables and stored procedure parameters is not restricted.

ODBC 예약된 키워드ODBC Reserved Keywords

다음은 ODBC 함수 호출에 사용하기 위해 예약된 단어입니다.The following words are reserved for use in ODBC function calls. 예약된 키워드는 최소 SQL 문법을 강요하지 않지만 핵심 SQL 문법을 지원하는 드라이버와의 호환성을 위해 응용 프로그램에 이 키워드를 사용하지 마십시오.These words do not constrain the minimum SQL grammar; however, to ensure compatibility with drivers that support the core SQL grammar, applications should avoid using these keywords.

다음은 ODBC 예약된 키워드의 현재 목록입니다.This is the current list of ODBC reserved keywords.

ABSOLUTEABSOLUTE EXECEXEC OVERLAPSOVERLAPS
ACTIONACTION EXECUTEEXECUTE PADPAD
ADAADA EXISTSEXISTS PARTIALPARTIAL
ADDADD 외부EXTERNAL PASCALPASCAL
ALLALL EXTRACTEXTRACT POSITIONPOSITION
ALLOCATEALLOCATE FALSEFALSE PRECISIONPRECISION
ALTERALTER FETCHFETCH PREPAREPREPARE
ANDAND FIRSTFIRST PRESERVEPRESERVE
ANYANY FLOATFLOAT PRIMARYPRIMARY
AREARE FORFOR PRIORPRIOR
ASAS FOREIGNFOREIGN PRIVILEGESPRIVILEGES
ASCASC FORTRANFORTRAN PROCEDUREPROCEDURE
ASSERTIONASSERTION FOUNDFOUND PUBLICPUBLIC
ATAT FROMFROM READREAD
AUTHORIZATIONAUTHORIZATION FULLFULL REALREAL
AVGAVG GETGET REFERENCESREFERENCES
BEGINBEGIN GLOBALGLOBAL RELATIVERELATIVE
BETWEENBETWEEN GOGO RESTRICTRESTRICT
BITBIT GOTOGOTO REVOKEREVOKE
BIT_LENGTHBIT_LENGTH GRANTGRANT RIGHTRIGHT
BOTHBOTH GROUPGROUP ROLLBACKROLLBACK
BYBY HAVINGHAVING ROWSROWS
CASCADECASCADE HOURHOUR SCHEMASCHEMA
CASCADEDCASCADED IDENTITYIDENTITY SCROLLSCROLL
CASECASE IMMEDIATEIMMEDIATE SECONDSECOND
CASTCAST ININ SECTIONSECTION
CATALOGCATALOG INCLUDEINCLUDE SELECTSELECT
CHARCHAR INDEXINDEX SESSIONSESSION
CHAR_LENGTHCHAR_LENGTH INDICATORINDICATOR SESSION_USERSESSION_USER
CHARACTERCHARACTER INITIALLYINITIALLY SETSET
CHARACTER_LENGTHCHARACTER_LENGTH INNERINNER SIZESIZE
CHECKCHECK INPUTINPUT SMALLINTSMALLINT
CLOSECLOSE INSENSITIVEINSENSITIVE SOMESOME
COALESCECOALESCE INSERTINSERT SPACESPACE
COLLATECOLLATE INTINT SQLSQL
COLLATIONCOLLATION INTEGERINTEGER SQLCASQLCA
COLUMNCOLUMN INTERSECTINTERSECT SQLCODESQLCODE
COMMITCOMMIT INTERVALINTERVAL SQLERRORSQLERROR
CONNECTCONNECT INTOINTO SQLSTATESQLSTATE
CONNECTIONCONNECTION ISIS SQLWARNINGSQLWARNING
CONSTRAINTCONSTRAINT ISOLATIONISOLATION SUBSTRINGSUBSTRING
CONSTRAINTSCONSTRAINTS JOINJOIN SUMSUM
CONTINUECONTINUE KEYKEY SYSTEM_USERSYSTEM_USER
CONVERTCONVERT LANGUAGELANGUAGE TABLETABLE
CORRESPONDINGCORRESPONDING LASTLAST TEMPORARYTEMPORARY
COUNTCOUNT LEADINGLEADING THENTHEN
CREATECREATE LEFTLEFT TIMETIME
CROSSCROSS LEVELLEVEL TIMESTAMPTIMESTAMP
CURRENTCURRENT LIKELIKE TIMEZONE_HOURTIMEZONE_HOUR
CURRENT_DATECURRENT_DATE LOCALLOCAL TIMEZONE_MINUTETIMEZONE_MINUTE
CURRENT_TIMECURRENT_TIME LOWERLOWER TOTO
CURRENT_TIMESTAMPCURRENT_TIMESTAMP MATCHMATCH TRAILINGTRAILING
CURRENT_USERCURRENT_USER MAXMAX TRANSACTIONTRANSACTION
CURSORCURSOR MINMIN TRANSLATETRANSLATE
DATEDATE MINUTEMINUTE TRANSLATIONTRANSLATION
DAYDAY MODULEMODULE TRIMTRIM
DEALLOCATEDEALLOCATE MONTHMONTH TRUETRUE
DECDEC NAMESNAMES UNIONUNION
DECIMALDECIMAL NATIONALNATIONAL UNIQUEUNIQUE
DECLAREDECLARE NATURALNATURAL UNKNOWNUNKNOWN
DEFAULTDEFAULT NCHARNCHAR UPDATEUPDATE
DEFERRABLEDEFERRABLE NEXTNEXT UPPERUPPER
DEFERREDDEFERRED NONO USAGEUSAGE
DELETEDELETE NONENONE USERUSER
DESCDESC NOTNOT USINGUSING
DESCRIBEDESCRIBE NULLNULL VALUEVALUE
DESCRIPTORDESCRIPTOR NULLIFNULLIF VALUESVALUES
DIAGNOSTICSDIAGNOSTICS NUMERICNUMERIC VARCHARVARCHAR
DISCONNECTDISCONNECT OCTET_LENGTHOCTET_LENGTH VARYINGVARYING
DISTINCTDISTINCT OFOF VIEWVIEW
DOMAINDOMAIN ONON WHENWHEN
DOUBLEDOUBLE ONLYONLY WHENEVERWHENEVER
DROPDROP OPENOPEN WHEREWHERE
ELSEELSE OPTIONOPTION WITHWITH
ENDEND OROR WORKWORK
END-EXECEND-EXEC ORDERORDER WRITEWRITE
ESCAPEESCAPE OUTEROUTER YEARYEAR
EXCEPTEXCEPT OUTPUTOUTPUT ZONEZONE
EXCEPTIONEXCEPTION

앞으로 사용될 키워드Future Keywords

다음은 앞으로 출시될 SQL ServerSQL Server에서 새 기능이 구현될 때 예약될 수 있는 키워드입니다.The following keywords could be reserved in future releases of SQL ServerSQL Server as new features are implemented. 다음 단어를 식별자로 사용하지 않는 것이 좋습니다.Consider avoiding the use of these words as identifiers.

ABSOLUTEABSOLUTE HOSTHOST RELATIVERELATIVE
ACTIONACTION HOURHOUR RELEASERELEASE
ADMINADMIN IGNOREIGNORE RESULTRESULT
AFTERAFTER IMMEDIATEIMMEDIATE RETURNSRETURNS
AGGREGATEAGGREGATE INDICATORINDICATOR ROLEROLE
ALIASALIAS INITIALIZEINITIALIZE ROLLUPROLLUP
ALLOCATEALLOCATE INITIALLYINITIALLY ROUTINEROUTINE
AREARE INOUTINOUT ROWROW
ARRAYARRAY INPUTINPUT ROWSROWS
ASENSITIVEASENSITIVE INTINT SAVEPOINTSAVEPOINT
ASSERTIONASSERTION INTEGERINTEGER SCROLLSCROLL
ASYMMETRICASYMMETRIC INTERSECTIONINTERSECTION SCOPESCOPE
ATAT INTERVALINTERVAL SEARCHSEARCH
ATOMICATOMIC ISOLATIONISOLATION SECONDSECOND
BEFOREBEFORE ITERATEITERATE SECTIONSECTION
BINARYBINARY LANGUAGELANGUAGE SENSITIVESENSITIVE
BITBIT LARGELARGE SEQUENCESEQUENCE
BLOBBLOB LASTLAST SESSIONSESSION
BOOLEANBOOLEAN LATERALLATERAL SETSSETS
BOTHBOTH LEADINGLEADING SIMILARSIMILAR
BREADTHBREADTH LESSLESS SIZESIZE
CALLCALL LEVELLEVEL SMALLINTSMALLINT
CALLEDCALLED LIKE_REGEXLIKE_REGEX SPACESPACE
CARDINALITYCARDINALITY LIMITLIMIT SPECIFICSPECIFIC
CASCADEDCASCADED LNLN SPECIFICTYPESPECIFICTYPE
CASTCAST LOCALLOCAL SQLSQL
CATALOGCATALOG LOCALTIMELOCALTIME SQLEXCEPTIONSQLEXCEPTION
CHARCHAR LOCALTIMESTAMPLOCALTIMESTAMP SQLSTATESQLSTATE
CHARACTERCHARACTER LOCATORLOCATOR SQLWARNINGSQLWARNING
CLASSCLASS MAPMAP STARTSTART
CLOBCLOB MATCHMATCH STATESTATE
COLLATIONCOLLATION MEMBERMEMBER STATEMENTSTATEMENT
COLLECTCOLLECT METHODMETHOD STATICSTATIC
COMPLETIONCOMPLETION MINUTEMINUTE STDDEV_POPSTDDEV_POP
CONDITIONCONDITION MODMOD STDDEV_SAMPSTDDEV_SAMP
CONNECTCONNECT MODIFIESMODIFIES STRUCTURESTRUCTURE
CONNECTIONCONNECTION MODIFYMODIFY SUBMULTISETSUBMULTISET
CONSTRAINTSCONSTRAINTS MODULEMODULE SUBSTRING_REGEXSUBSTRING_REGEX
CONSTRUCTORCONSTRUCTOR MONTHMONTH SYMMETRICSYMMETRIC
CORRCORR MULTISETMULTISET SYSTEMSYSTEM
CORRESPONDINGCORRESPONDING NAMESNAMES TEMPORARYTEMPORARY
COVAR_POPCOVAR_POP NATURALNATURAL TERMINATETERMINATE
COVAR_SAMPCOVAR_SAMP NCHARNCHAR THANTHAN
CUBECUBE NCLOBNCLOB TIMETIME
CUME_DISTCUME_DIST NEWNEW timestampTIMESTAMP
CURRENT_CATALOGCURRENT_CATALOG NEXTNEXT TIMEZONE_HOURTIMEZONE_HOUR
CURRENT_DEFAULT_TRANSFORM_GROUPCURRENT_DEFAULT_TRANSFORM_GROUP 아니요NO TIMEZONE_MINUTETIMEZONE_MINUTE
CURRENT_PATHCURRENT_PATH 없음NONE TRAILINGTRAILING
CURRENT_ROLECURRENT_ROLE NORMALIZENORMALIZE TRANSLATE_REGEXTRANSLATE_REGEX
CURRENT_SCHEMACURRENT_SCHEMA NUMERICNUMERIC TRANSLATIONTRANSLATION
CURRENT_TRANSFORM_GROUP_FOR_TYPECURRENT_TRANSFORM_GROUP_FOR_TYPE OBJECTOBJECT TREATTREAT
CYCLECYCLE OCCURRENCES_REGEXOCCURRENCES_REGEX TRUETRUE
DATADATA OLDOLD UESCAPEUESCAPE
DATEDATE ONLYONLY UNDERUNDER
DAYDAY OPERATIONOPERATION UNKNOWNUNKNOWN
DECDEC ORDINALITYORDINALITY UNNESTUNNEST
DECIMALDECIMAL OUTOUT USAGEUSAGE
DEFERRABLEDEFERRABLE OVERLAYOVERLAY USINGUSING
DEFERREDDEFERRED OUTPUTOUTPUT ValueVALUE
DEPTHDEPTH PADPAD VAR_POPVAR_POP
DEREFDEREF 매개 변수PARAMETER VAR_SAMPVAR_SAMP
DESCRIBEDESCRIBE PARAMETERSPARAMETERS VARCHARVARCHAR
DESCRIPTORDESCRIPTOR PARTIALPARTIAL VARIABLEVARIABLE
DESTROYDESTROY PARTITIONPARTITION WHENEVERWHENEVER
DESTRUCTORDESTRUCTOR PATHPATH WIDTH_BUCKETWIDTH_BUCKET
DETERMINISTICDETERMINISTIC POSTFIXPOSTFIX WITHOUTWITHOUT
DICTIONARYDICTIONARY PREFIXPREFIX WINDOWWINDOW
DIAGNOSTICSDIAGNOSTICS PREORDERPREORDER WITHINWITHIN
DISCONNECTDISCONNECT PREPAREPREPARE WORKWORK
DOMAINDOMAIN PERCENT_RANKPERCENT_RANK WRITEWRITE
DYNAMICDYNAMIC PERCENTILE_CONTPERCENTILE_CONT XMLAGGXMLAGG
EACHEACH PERCENTILE_DISCPERCENTILE_DISC XMLATTRIBUTESXMLATTRIBUTES
ELEMENTELEMENT POSITION_REGEXPOSITION_REGEX XMLBINARYXMLBINARY
END-EXECEND-EXEC PRESERVEPRESERVE XMLCASTXMLCAST
EQUALSEQUALS PRIORPRIOR XMLCOMMENTXMLCOMMENT
EVERYEVERY PRIVILEGESPRIVILEGES XMLCONCATXMLCONCAT
EXCEPTIONEXCEPTION RANGERANGE XMLDOCUMENTXMLDOCUMENT
FALSEFALSE READSREADS XMLELEMENTXMLELEMENT
FILTERFILTER realREAL XMLEXISTSXMLEXISTS
FIRSTFIRST RECURSIVERECURSIVE XMLFORESTXMLFOREST
FLOATFLOAT REFREF XMLITERATEXMLITERATE
FOUNDFOUND REFERENCINGREFERENCING XMLNAMESPACESXMLNAMESPACES
FREEFREE REGR_AVGXREGR_AVGX XMLPARSEXMLPARSE
FULLTEXTTABLEFULLTEXTTABLE REGR_AVGYREGR_AVGY XMLPIXMLPI
FUSIONFUSION REGR_COUNTREGR_COUNT XMLQUERYXMLQUERY
GENERALGENERAL REGR_INTERCEPTREGR_INTERCEPT XMLSERIALIZEXMLSERIALIZE
GETGET REGR_R2REGR_R2 XMLTABLEXMLTABLE
GLOBALGLOBAL REGR_SLOPEREGR_SLOPE XMLTEXTXMLTEXT
GOGO REGR_SXXREGR_SXX XMLVALIDATEXMLVALIDATE
GROUPINGGROUPING REGR_SXYREGR_SXY YEARYEAR
HOLDHOLD REGR_SYYREGR_SYY ZONEZONE

참고 항목See Also

SET QUOTED_IDENTIFIER(Transact-SQL) SET QUOTED_IDENTIFIER (Transact-SQL)
ALTER DATABASE 호환성 수준(Transact-SQL)ALTER DATABASE Compatibility Level (Transact-SQL)