Search

Advertisements

SQL Server - SHOWPLAN permission denied in database - Error - Msg 262, Level 14, State 4, Line 1

When a User with minimum privilege try to view the execution plan for a query, below error will throwed:

Msg 262, Level 14, State 4, Line 1
SHOWPLAN permission denied in database 'AdventureWorks2012'.



To resolve the error:

SQL Server - Subquery - Be careful in passing column names in the subqueries

If a column is referenced in a subquery that does not exist in the table referenced by the subquery's FROM clause, but exists in a table referenced by the outer query's FROM clause, the query executes without error.
SQL Server implicitly qualifies the column in the subquery with the table name in the outer query.
Examples:

T-SQL - Storing and retrieving multi lingual data

In SQL Server, to store and retrieve multi lingual data :

*) We should define the column data type as NVARCHAR

*) and while inserting multi lingual data into column, column value should be prefixed with N'

For example:

Advertisements