This document provides an introduction and overview of stored procedures and functions in SQL. It discusses transaction management using COMMIT and ROLLBACK statements. It defines stored procedures as precompiled collections of SQL statements that can accept parameters and return values. Stored procedures offer benefits like modular programming and faster execution. The document also introduces user-defined functions and provides examples of creating and executing stored procedures and functions.
Overview of SQL 2008 spatial data types, spatial data operations, geocoding, and visualization. This does not include the visualization options added to SQL 2008 R2.
Procedures in pl/sql,CREATE PROCEDURE Syntax, Compiling and Showing Errors, Parameters, Defining the IN, OUT, and IN OUT Parameter Modes, Parameter Constraint Restrictions, Example – Procedure with No Parameters,Example – Passing IN and OUT Parameters, Dropping a Procedure
Introduction to AI for Nonprofits with Tapp NetworkTechSoup
Dive into the world of AI! Experts Jon Hill and Tareq Monaur will guide you through AI's role in enhancing nonprofit websites and basic marketing strategies, making it easy to understand and apply.
Unit 8 - Information and Communication Technology (Paper I).pdfThiyagu K
This slides describes the basic concepts of ICT, basics of Email, Emerging Technology and Digital Initiatives in Education. This presentations aligns with the UGC Paper I syllabus.
Biological screening of herbal drugs: Introduction and Need for
Phyto-Pharmacological Screening, New Strategies for evaluating
Natural Products, In vitro evaluation techniques for Antioxidants, Antimicrobial and Anticancer drugs. In vivo evaluation techniques
for Anti-inflammatory, Antiulcer, Anticancer, Wound healing, Antidiabetic, Hepatoprotective, Cardio protective, Diuretics and
Antifertility, Toxicity studies as per OECD guidelines
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...Levi Shapiro
Letter from the Congress of the United States regarding Anti-Semitism sent June 3rd to MIT President Sally Kornbluth, MIT Corp Chair, Mark Gorenberg
Dear Dr. Kornbluth and Mr. Gorenberg,
The US House of Representatives is deeply concerned by ongoing and pervasive acts of antisemitic
harassment and intimidation at the Massachusetts Institute of Technology (MIT). Failing to act decisively to ensure a safe learning environment for all students would be a grave dereliction of your responsibilities as President of MIT and Chair of the MIT Corporation.
This Congress will not stand idly by and allow an environment hostile to Jewish students to persist. The House believes that your institution is in violation of Title VI of the Civil Rights Act, and the inability or
unwillingness to rectify this violation through action requires accountability.
Postsecondary education is a unique opportunity for students to learn and have their ideas and beliefs challenged. However, universities receiving hundreds of millions of federal funds annually have denied
students that opportunity and have been hijacked to become venues for the promotion of terrorism, antisemitic harassment and intimidation, unlawful encampments, and in some cases, assaults and riots.
The House of Representatives will not countenance the use of federal funds to indoctrinate students into hateful, antisemitic, anti-American supporters of terrorism. Investigations into campus antisemitism by the Committee on Education and the Workforce and the Committee on Ways and Means have been expanded into a Congress-wide probe across all relevant jurisdictions to address this national crisis. The undersigned Committees will conduct oversight into the use of federal funds at MIT and its learning environment under authorities granted to each Committee.
• The Committee on Education and the Workforce has been investigating your institution since December 7, 2023. The Committee has broad jurisdiction over postsecondary education, including its compliance with Title VI of the Civil Rights Act, campus safety concerns over disruptions to the learning environment, and the awarding of federal student aid under the Higher Education Act.
• The Committee on Oversight and Accountability is investigating the sources of funding and other support flowing to groups espousing pro-Hamas propaganda and engaged in antisemitic harassment and intimidation of students. The Committee on Oversight and Accountability is the principal oversight committee of the US House of Representatives and has broad authority to investigate “any matter” at “any time” under House Rule X.
• The Committee on Ways and Means has been investigating several universities since November 15, 2023, when the Committee held a hearing entitled From Ivory Towers to Dark Corners: Investigating the Nexus Between Antisemitism, Tax-Exempt Universities, and Terror Financing. The Committee followed the hearing with letters to those institutions on January 10, 202
Read| The latest issue of The Challenger is here! We are thrilled to announce that our school paper has qualified for the NATIONAL SCHOOLS PRESS CONFERENCE (NSPC) 2024. Thank you for your unwavering support and trust. Dive into the stories that made us stand out!
Macroeconomics- Movie Location
This will be used as part of your Personal Professional Portfolio once graded.
Objective:
Prepare a presentation or a paper using research, basic comparative analysis, data organization and application of economic information. You will make an informed assessment of an economic climate outside of the United States to accomplish an entertainment industry objective.
Normal Labour/ Stages of Labour/ Mechanism of LabourWasim Ak
Normal labor is also termed spontaneous labor, defined as the natural physiological process through which the fetus, placenta, and membranes are expelled from the uterus through the birth canal at term (37 to 42 weeks
Synthetic Fiber Construction in lab .pptxPavel ( NSTU)
Synthetic fiber production is a fascinating and complex field that blends chemistry, engineering, and environmental science. By understanding these aspects, students can gain a comprehensive view of synthetic fiber production, its impact on society and the environment, and the potential for future innovations. Synthetic fibers play a crucial role in modern society, impacting various aspects of daily life, industry, and the environment. ynthetic fibers are integral to modern life, offering a range of benefits from cost-effectiveness and versatility to innovative applications and performance characteristics. While they pose environmental challenges, ongoing research and development aim to create more sustainable and eco-friendly alternatives. Understanding the importance of synthetic fibers helps in appreciating their role in the economy, industry, and daily life, while also emphasizing the need for sustainable practices and innovation.
14. BuiltIn Variables Returns the maximum number of simultaneous user connections allowed on a Microsoft® SQL Server™. The number returned is not necessarily the number currently configured. @@MAXCONNECTION Returns the name of the language currently in use. @@LANGUAGE Returns the name of the local server running Microsoft® SQL Server™. @@SERVERNAME Returns the number of rows affected by the last statement. @@ROWCOUNT Returns the last-inserted identity value. @@IDENTITY Returns the error number for the last Transact-SQL statement executed. @@ERROR Description Variable
Faculty Notes : if Defines conditional execution. … else Defines alternate execution when the if condition is false. case Defines conditional expressions using when…then statements instead of if…else. begin Beginning of a statement block. … end End of a statement block. while Repeat performance of statements while condition is true. break Exit from the end of the next outermost while loop. … continue Restart while loop. declare Declare local variables. goto label Go to label:, a position in a statement block. return Exit unconditionally. waitfor Set delay for command execution. print Print a user-defined message or local variable on user’s screen. raiserror Print a user-defined message or local variable on user’s screen and set a system flag in the global variable @@ error . /* comment */ or -- comment Insert a comment anywhere in a Transact-SQL statement.
Faculty Notes: Example: if exists(select zip from authors where zip='9470') print 'Msg print' else print 'Msg print else'
Faculty Notes : Example: select CASE convert(int, (RAND() * 3)) when 0 then "A" when 1 then "B" else "E" end
Faculty Notes : The begin and end keywords create a block for a series of statements enclosed in it. This is treated as one unit by control of flow constructs. Enclosed statements in begin and end are called a statement block . The syntax of begin...end is: begin statement block end
Faculty Notes: A typical transaction is a catalog merchandise order phoned in by a customer and entered into a computer by a customer representative. The order transaction involves checking an inventory database, confirming that the item is available, placing the order and confirming that the order has been placed and noting the expected time of shipment. If we view this as a single transaction, then all of the steps must be completed before the transaction is successful and the database is actually changed to reflect the new order. If something happens before the transaction is successfully completed, any changes to the database must be documented so that they can be undone. SQL Server transactions are often described as having the ACID properties or "passing the ACID test," where ACID is an acronym for atomic, consistent, isolated, and durable. Transactional adherence to the ACID tenets is commonplace in modern RDBMS and is a prerequisite for ensuring the safety and reliability of data.
Faculty Notes: Review points on slide
Faculty Notes: Review points on slide
Faculty Notes: Review points on slide
Faculty Notes: We can begin a Transaction explicitly using keyword BEGIN TRANS and End Trans and add the statements to be executed. When this transition is executed if any of the statements fail the whole transaction will be rolled back In the Example two statements are executed one after another in a transaction The insert statement is executed and one row is inserted (But not yet committed its still in the Transaction) Assume the Delete Statement fails, as Job id 13 is in use in another child table. The @@ERROR variable checks if there’s any error for the transaction and if found rolls back the whole transaction as a whole i.e. It does not insert the record in the employee table
Faculty Notes: These variables are provided by SQL Server. Explanation of each has been described above.
Faculty Notes: Review points on slide
Faculty Notes: Review points on slide
Faculty Notes: Modular programming You can create the procedure once, store it in the database, and call it any number of times in your program. Stored procedures can be created by a person who specializes in database programming, and they can be modified independently of the program source code. Faster Execution If the operation requires a large amount of Transact-SQL code or is performed repetitively, stored procedures can be faster than batches of Transact-SQL code. They are parsed and optimized when they are created, and an in-memory version of the procedure can be used after the procedure is executed the first time. Transact-SQL statements repeatedly sent from the client each time they run, are compiled and optimized every time they are executed by SQL Server. Network traffic An operation requiring hundreds of lines of Transact-SQL code can be performed through a single statement that executes the code in a procedure, rather than by sending hundreds of lines of code over the network. Security Mechanism Users can be granted permission to execute a stored procedure even if they do not have permission to execute the procedure's statements directly.
Faculty Notes: procedure_name Is the name of the new stored procedure. ; number Is an optional integer used to group procedures of the same name so they can be dropped together with a single DROP PROCEDURE statement. For example, the procedures used with an application called orders may be named orderproc ;1, orderproc ;2, and so on. @ parameter Is a parameter in the procedure. One or more parameters can be declared in a CREATE PROCEDURE statement. The value of each declared parameter must be supplied by the user when the procedure is executed (unless a default for the parameter is defined). Specify a parameter name using an at sign (@) as the first character. data_type Is the parameter data type. All data types, including text, ntext and image , can be used as a parameter for a stored procedure. Note There is no limit on the maximum number of output parameters that can be of cursor data type. VARYING Specifies the result set supported as an output parameter (constructed dynamically by the stored procedure and whose contents can vary). Default Is a default value for the parameter. If a default is defined, the procedure can be executed without specifying a value for that parameter. n Is a placeholder indicating that a maximum of 2,100 parameters can be specified. {RECOMPILE | ENCRYPTION | RECOMPILE , ENCRYPTION} RECOMPILE indicates that SQL Server does not cache a plan for this procedure and the procedure is recompiled at run time. ENCRYPTION indicates that SQL Server encrypts the syscomments table entry containing the text of the CREATE PROCEDURE statement. FOR REPLICATION Specifies that stored procedures created for replication cannot be executed on the Subscriber. A stored procedure created with the FOR REPLICATION option is used as a stored procedure filter and only executed during replication. This option cannot be used with the WITH RECOMPILE option. AS Specifies the actions the procedure is to take. sql_statement Is any number and type of Transact-SQL statements to be included in the procedure. Some limitations apply. n Is a placeholder that indicates multiple Transact-SQL statements may be included in this procedure.
Faculty Notes: The above example creates a stored procedure spAuthorDetail it accepts one parameter @AuthId of int data type when the sp is to be executed the user has to pass value to the stored procedure as shown below execute spAuthorDetail 1456 The values passed to the stored procedure are further passed to the select query. Based on the parameter passed the select statement is executed .
Facutly notes: We can also use function to insert data into a table Insert into mytab values (dbo.addition(2,2))
Faculty Notes: Review the key points on the slide. The key points should be used to summarize the content covered throughout this presentation.