difference between t- and pl sql lang

5 pts.
Tags:
PL/SQL
T-SQL
in both t-sql and pl/sql we can use if/else condition and jump into other statements..then actually what makes the difference between t- and pl sql lang?

Software/Hardware used:
sql server
ASKED: February 8, 2010  4:23 AM
UPDATED: February 10, 2010  5:55 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

There are many things you can do with both pl/sql and t-sql, <b>but the syntax is different</b> in most cases, also, there might be some things you can do with one of them but not with the other.

T-SQL is used with MS SQL Server databases (mainly), and PL/SQL is used with Oracle databases.

——————–

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Rick Martinez
    PL/SQL (Procedural Language/Structured Query Language) is Oracle Corporation's procedural extension language for SQL and the Oracle relational database Sample PL SQL: DECLARE number1 NUMBER(2); number2 NUMBER(2) := 17; -- value default text1 VARCHAR2(12) := 'Hello world'; text2 DATE := SYSDATE; -- current date and time BEGIN SELECT street_number INTO number1 FROM address WHERE name = 'INU'; END; Transact-SQL (T-SQL) is Microsoft's and Sybase's proprietary extension to SQL. Sample T-SQL: DECLARE @Counter INT SET @Counter = 10 WHILE @Counter > 0 BEGIN PRINT 'The count is ' + CONVERT(VARCHAR(10), @Counter) SET @Counter = @Counter - 1 END
    585 pointsBadges:
    report
  • Rick Martinez
    Carlos is right the syntax is different.
    585 pointsBadges:
    report
  • Kccrosser
    In addition to the basic syntax differences, there are significant differences in the capabilities. In PL/SQL, Oracle has implemented true structured programming and encapsulation functionality that is completely missing from Transact-SQL. In PL/SQL, you can nest in-line procedures and functions within another procedure/function, allowing you to hide internal details and easily implement repetitive tasks via the nested components. In T-SQL, each function/procedure needs to be compiled separately. In PL/SQL, if you need to do something twice, you just write a nested function once and call it twice. In T-SQL, you need to decide if the tradeoff of creating yet another separate component is worth the trouble, or do you just copy and paste the same code. This can have signficant impacts on maintainability. In PL/SQL, you can create Packages to contain entire suites of data structures, procedures, and functions, and only expose those public interfaces that you want external callers to see. Plus, Packages can maintain internal variable states between calls, even including complex temporary table structures. Neither of these capabilities is available in T-SQL.
    3,830 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following