answersLogoWhite

0

Transact-SQL in an internationally standardised method to create, modify and delete databases and tables, as well as insert, retrieve, modify and delete data stored in a database. With Microsoft SQL Server 2005 you can also author procedures in any managed language such as C# or VB. This is because it is integrated with the CLR which allows you write powerful programs inside stored procedures. All functionality of the .NET Framework BCL (Base Class Library) is available to your stored procedures. This means that developers have access to thousands of pre-built classes and routines which can be accessed. The BCL includes classes that provide functionality for improved string functioning, advanced math operations, file access, cryptography, and more.

User Avatar

Wiki User

17y ago

What else can I help you with?

Related Questions

How do call stored procedure in jsp?

To call a stored procedure in JSP, you typically use JDBC (Java Database Connectivity). First, establish a connection to your database using DriverManager. Then, create a CallableStatement object with the stored procedure's SQL call (e.g., {call procedure_name(?, ?)}) and set any required parameters. Finally, execute the statement using execute() or executeUpdate() and process the results as needed.


What is sql database?

An SQL database is one that implements the use of Structured Query Language to manage data stored in the database. SQL is the most used way of communicating with databases.


Difference between a local procedure and stored procedure?

local procedure wont store in database. Stored procedure store in database permanently and we can use it whenever we require. Other program also can use this stored procedure. And the transaction of stored procedure take care by DBA. But the local procedure transaction is take care by manually only


How do you create site password with JavaScript?

JavaScript is an exceptionally poor choice for password protection. By its very nature it runs on the user's computer, which means an even minutely clever user can see it. If you want passwords that aren't trivial to get around, use a server-side language (PHP or Ruby On Rails might be good choices) to check the passwords against a database (with code properly protected against SQL injection, preferably with stored procedures).


What is the programming language does enovia use?

It's JAVA based on the front end with Html and Javascript for the web interface. The backend can be either Oracle or SQL Server 2005/2008 -- with SQL Server 2008 being be better performance over Oracle on the same hardware and lower cost.


Which subprogram do you use to display the source code of a stored procedure when using dbms debug?

To display the source code of a stored procedure when using DBMS_DEBUG in Oracle, you can use the DBMS_DEBUG.GET_SOURCE subprogram. This procedure retrieves the source code for a specified procedure or package and allows you to view its contents. You typically need to specify the name of the procedure and the necessary parameters to access the desired code.


Can you use javascript in Mozilla?

Yes. In fact, you can use JavaScript in any web browser.


What statement is used to execute a procedure?

Just use the name of the procedure. For example, if I have a procedure addEntry(a NUMBER, b OUT NUMBER) then I can call it by: DECLARE x NUMBER; BEGIN addEntry(5, x); END . run;


How do you use SQL?

You use SQL by issuing commands to an SQL server, either directly by you or by a program you are using.


How do you use javascript in aspnet?

Ajax, I believe uses JavaScript + ASP.


How do you write javascript code to close a browser window?

If you want to close the current window, use window.close() or simply close() If you want to close a window that is stored in a JavaScript variable, apply the method close() to it. For example: var myWindow=window.open("http:\/\/www.example.com/"); myWindow.close();


How do you increase stored procedure execution time?

1. Use SET NOCOUNT ONBy default, every time a stored procedure is executed, a message is sent from the server to the client indicating the number of rows that were affected by the stored procedure. By turning off this default behaviour, you can reduce network traffic between the server and the client.2. Use fully qualified name while invoking stored procedures from application and inside SPs.This allows SQL Server to access the stored procedures execution plan more directly, and in turn, speeding up the performance of the stored procedure.Use this,EXEC dbo.yourProcedureInstead ofEXEC yourProcedure4. Select only the required columnsUsage of SELECT * can be the cause of NOT using the indexes available on the table. Also, selecting more data means more IO resources.5. Minimize the use of not equal operations, or !=.SQL Server has to scan a table or index to find all values to see if they are not equal to the value given in the expression.Use this,SELECT Name, Description, OrderDate FROM Orders WHERE OrderDate < '2005-01-01' OR OrderDate > '2011-01-01'instead of thisSELECT Name, Description, OrderDate FROM Orders WHERE OrderDate '2011-01-11'6. Avoid Mixing-up DML and DDL statement on a temp table inside spWhen you create a temp table (#table) and ALTER the same temptable in the same stored procedure later, it causes the stored procedure to get recompiled.7. Avoid using DISTINCT when not required.Sort operation is performed for a distinct calculation, which is costly and hits performance.8. Ensure columns with similar datatype are used when using JOINSFor best performance, the columns used in joins should be of the same data types. And if possible, they should be numeric data types rather than character types.9. Use EXISTS clause instead of Count(*) for checking existenceUse EXISTS instead of COUNT(*) when looking for the existence of one or more rows in a sub query. EXISTS cancels the sub query once the first existence of a record is found, while COUNT(*) forces processing of the entire query.10.Remove PRINT statements from stored procedures.Normally print statements are used for debugging the SPs. Print statements adds an additional overhead to performance because SQL server sends the output to client.11.Do not use Dynamic SQL inside stored procedures.Every query you run in SQL Server requires a query plan. When you run a query the first time, SQL Server builds a query plan for it . SQL Server saves the plan in cache, and next time you run the query, the plan is reused. While using dynamic SQL, query execution plan is not cached for the dynamic SQL and it will affect the performance badly.12.Keep all Transactions short as possible.This helps to reduce the number of locks (of all types), helping to speed up the overall performance of SQL Server.13.Use SP_EXECUTESQL rather than EXEC(), it has better performance and improved securitySp_executesql offers two major advantages over EXECUTE,1. First, it supports parameter substitution, parameterised statements gives no risk to SQL injection and increases readability.2. Second, it creates query execution plans that are more likely to be reused by SQL Server, which in turn reduces overhead on the server, boosting performance.14.Always put the DECLARE statements in the starting of the stored procedure.This enables query optimizer to reuse query plans and also increases readability.15.Use UNION and UNION ALL properly based on requirement.A UNION statement effectively does a SELECT DISTINCT on the results set. If you know that all the records returned are unique from your union, use UNION ALL instead, it gives faster results.16.Do not use Cursors when they are not required.Cursors of any kind slow SQL Server's performance. While is some cases they cannot be avoided, in many cases they can. If you need to perform row-by-row operations, consider using one or more of these options instead of using a cursor:a) Use temp tablesb) Use WHILE loopsc) Use derived tablesd) Use correlated sub-queriese) Use CASE statementsf) Use multiple queries17.Don't do SELECT MAX(ID) from MasterTable when inserting in a details table.This will fail when concurrent users are inserting data at the sameinstance. Use one of SCOPE_IDENTITY or IDENT_CURRENT. SCOPE_IDENTITY would give you the identity value from the current context in perspective.18.All stored procedures should contain the prescribed header.19.Code that has been "commented out" should be explained or removed.Before you are done with your stored procedure code, review it for any unused code, parameters, or variables that you may have forgotten to remove while you were making changes, and remove them. Unused code just adds unnecessary bloat to your stored procedures.20.Write SQL keyword in capital letters for better readability and ensure the code is formatted properly.a) SQL Keywords should start in a new line and all the keywords should be aligned together.b) Is the code readable?UPDATE dbo.Orders SET OrderStatus = @ORDER_PENDING WHERE OrdDate < '2001/10/25'21.Do not use NON ANSI joinsThe use of the JOIN clause separates the relationship logic from the filter logic (the WHERE) and is thus cleaner and easier to understand.ANSISELECT * FROM a JOIN b ON a.id = b.idNon ANSISELECT * FROM a, b WHERE a.id = b.id