TechNet
Export (0) Print
Expand All
Collapse the table of content
Expand the table of content
Expand Minimize

sp_validname (Transact-SQL)

 

THIS TOPIC APPLIES TO:yesSQL Server (starting with 2008)yesAzure SQL DatabasenoAzure SQL Data Warehouse noParallel Data Warehouse

Checks for valid SQL Server identifier names. All nonbinary and nonzero data, including Unicode data that can be stored by using the nchar, nvarchar, or ntext data types, are accepted as valid characters for identifier names.

Applies to: SQL Server (SQL Server 2008 through current version), Azure SQL Database.

Topic link icon Transact-SQL Syntax Conventions

  
sp_validname [@name =] 'name'   
     [, [@raise_error =] raise_error]  

[ @name= ] 'name'
Is the name of the identifiers for which to check validity. name is sysname, with no default. name cannot be NULL, cannot be an empty string, and cannot contain a binary-zero character.

[ @raise_error= ] raise_error
Specifies whether to raise an error. raise_error is bit, with a default of 1. This means that errors will appear. 0 causes no error messages to appear.

0 (success) or 1 (failure)

Requires membership in the public role.

Database Engine Stored Procedures (Transact-SQL)
Data Types (Transact-SQL)
NCHAR (Transact-SQL)
nchar and nvarchar (Transact-SQL)
ntext, text, and image (Transact-SQL)
System Stored Procedures (Transact-SQL)

Community Additions

ADD
Show:
© 2016 Microsoft