nerdexam
Microsoft

70-433 · Question #92

You are working with a SQL Server 2008 instance that is configured to use the Latin1_General_CS_AS collation. You create a database by using the following statements. CREATE DATABASE TestDB COLLATE…

The correct answer is C. Latin1_General_CS_AS. When using temporary tables without specifying a collation (for the column used) SQL Server will inherit the collation for the newly created temporary table from the SQL Server instance default. You can use the database_default option in the COLLATE clause to specify that a…

Implement Tables and Views

Question

You are working with a SQL Server 2008 instance that is configured to use the Latin1_General_CS_AS collation. You create a database by using the following statements. CREATE DATABASE TestDB COLLATE Estonian_CS_AS; GO USE TestDB; GO CREATE TABLE TestPermTab (PrimaryKey int PRIMARY KEY, Col1 nchar ); You implement a temporary table named #TestTempTab that uses the following code. use TestDB; GO CREATE TABLE #TestTempTab (PrimaryKey int PRIMARY KEY, Col1 nchar ); INSERT INTO #TestTempTab SELECT * FROM TestPermTab; You need to identify which collation will be assigned to #TestTempTab. Which collation will be assigned?

Options

  • ANo-collation
  • BEstonian_CS_AS
  • CLatin1_General_CS_AS
  • DThe collation selected by the Windows system locale of the server

How the community answered

(31 responses)
  • A
    10% (3)
  • B
    3% (1)
  • C
    81% (25)
  • D
    6% (2)

Explanation

When using temporary tables without specifying a collation (for the column used) SQL Server will inherit the collation for the newly created temporary table from the SQL Server instance default. You can use the database_default option in the COLLATE clause to specify that a column in a temporary table use the collation default of the current user database for the connection instead

Topics

#temporary table collation#server collation#database collation#collation inheritance

Community Discussion

No community discussion yet for this question.

Full 70-433 Practice