0% found this document useful (0 votes)
63 views3 pages

Top 24 T SQL Interview Questions

Guru99 provides free online tutorials on various topics including Java, SQL, Python, data science, and more. The tutorials cover a wide range of technologies and subjects at different skill levels for students and professionals looking to learn. The site also features hands-on projects and career guidance resources to help users apply their skills.

Uploaded by

Sobuj Sap
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views3 pages

Top 24 T SQL Interview Questions

Guru99 provides free online tutorials on various topics including Java, SQL, Python, data science, and more. The tutorials cover a wide range of technologies and subjects at different skill levels for students and professionals looking to learn. The site also features hands-on projects and career guidance resources to help users apply their skills.

Uploaded by

Sobuj Sap
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

https://career.guru99.

com/

Guru99 Provides FREE ONLINE TUTORIAL on Various courses like

Java | MIS | MongoDB | BigData | Cassandra | Web Services


-------------------------------------------------------------------------------------------------------------------------------
SQLite | JSP | Informatica | Accounting | SAP Training | Python
-------------------------------------------------------------------------------------------------------------------------------
Excel | ASP Net | HBase | Testing | Selenium | CCNA | NodeJS
-------------------------------------------------------------------------------------------------------------------------------
TensorFlow | Data Warehouse | R Programming | Live Projects | DevOps
-------------------------------------------------------------------------------------------------------------------------------

Top 24 T-SQL Interview Questions & Answers


1) Mention what is T-SQL?

T-SQL stands for Transact Structured Query Language. It is an extension of SQL functionality
supported by Microsoft SQL Server and Sybase ASE.

2) Mention what is the difference between SQL and T-SQL?

The difference between SQL and TSQL is that SQL is a query language to operate on sets,
while TSQL is a proprietary procedural language used by MS SQL Server. Also, T-SQL has a
different implementation of DELETE and UPDATE than SQL.

3) Mention how tsql statements can be written and submitted to the Database engine?

Tsql statements can be written and submitted to the Database engine in following ways,

By using the SQLcmd Utility


By using the SQL Server Management Studio
By connecting from an application that you create

4) Mention what is “GO” in T-SQL?

"GO" is not a Transact-SQL statement but a batch separator. It is a command identified by the
sqlcmd and osql utilities and SQL Server Management Studio Code editor. SQL Server utilities
read “GO” as a signal that they should send the current batch of TSQL statements to an
instance of SQL Server.

5) Mention what is the difference between TRUNCATE and DELETE statement?

The difference between TRUNCATE and DELETE statement is that,

1/3
https://career.guru99.com/

TRUNCATE is used for unconditional removal of data records from Tables. Truncate
Operations are not logged.
DELETE is used for conditional removal of data records from Tables. These operations
are logged.

6) Mention how does a local variable is defined using T-SQL?

A local variable is defined using TSQL by using statement “DECLARE” and the name of the
local variable should begin with “@” sign as the first character of its name. For example, integer
CNT we will define local variable as,

DECLARE @CNT INT

7) Mention what does the T-SQL command IDENT_CURRENT does?

The TSQL command IDENT_CURRENT returns the last identity value produced for a specified
table or view. The last identity value created can be for any session and any scope.

8) Mention what does the T-SQL command IDENT_INCR does?

TSQL command IDENT_INCR returns the increment value mentioned during the formation of
an identity column in a table or view that has an identity column.

9) Mention if it is possible to import data directly from T-SQL commands without using
SQL Server Integration Services? If yes, what are the commands?

Yes, it is possible to import data directly from T-SQL commands without using SQL Server
Integration Services. These commands include,

BCP
OpenRowSet
Bulk Insert
OPENQUERY
OPENDATASOURCE
Linked Servers

2/3
https://career.guru99.com/

10) Mention what is sub-query?

A sub-query is used to return data that will be used in the main query as a condition to further
restrict the data to be retrieved.

A sub-query can be used with the statements like Update, select, delete and insert with the
operators like =, >, =,

3/3
Powered by TCPDF (www.tcpdf.org)

You might also like