MCQs Test!! VB Basic Test !! Essentials of VB !! Creating User Services !! function !! Anatomy !! GK March-2019 !! DATA TYPES IN JAVA !! Classes ,Constructor ,Methods,Inheritance !! Ecology-I !! Biology 2019 !! Gk april 2019 !! Biology (living world) !! Plant anatomy !! CELL STRUCTURES AND FUNCTION !! General biology !! Human physiology !! Data structure !! Ecology-II !! GK TEST !! Reproduction in plants !! Human reproduction !! The ABC of C !! Operating system set1 !! Operating system set2 !! Gk and current affairs !! Animal kingdom !! Number system !! Animal kingdom-II !! Gk TEST-III !! Number series !! Microorganisms !! Interview question in c !! Time and Work !! Percentage !! General history !! Average !! Cells !! Locomotion and Movement !! paging !! Bacteriology !! Page replacement policy !! Secondary memory and Disk scheduling !! Introduction of Nervous System and neurons !! Plant harmones !! Transport and Mineral Nutrition in Plants !! Neurotransmitters !! Modern Indian History !! Photosynthesis in Plants !! Modern Indian History-II !! Plant respiration !! Environment & Biodiversity !! Environment & Biodiversity - II !! Algae, Bryophytes, Pteridophytes !! Area !! Cricket !! Days of the Year (India and the World) !! Plant Pathology - I !! Indian Transport System !! Plant Pathology - II !! Aptitude !! Biology !! Botany !! C language !! Computer Science !! Core Java !! Gate !! GK !! Mysql !! Operating system !! Physics !! VB-Visual Basic !! Zoology


Programming in SQL Server
Previous Home Next

programming in sql provides various functionalities are /p>

  1. Batches
  2. Variables
  3. Printing Messages
  5. Control-of-flow statements


  1. Batches are groups of SQL statement submitted together to SQL Server  for execution
  2. A batch is parsed
  3. A batch is optimized
  4. A batch is compiled/li>
  5. A batch is executed
  6. SQL server compiled the statements  of a batch into a single unit called an execution plane
  7. The statement in the execution plane are then executed one at a time
  8. There is any error in a batch, no statement in the batch is executed



  1. You cannot bind rules and defaults to columns and use them in the same batch
  2. You can not define and use the CHECK constraints in the same batch
  3. You can not drop object and recreate them in the same batch
  4. you cannot alter a table and reference the new column in the same batch


Variable used to store a temporary value. We can declare and assign a value to a variable, declared a variable by using DECLARE statement.


DECLARE @variable_name data_type

The @ symbol before the variable name. This symbol is required and is used by the query processor to identify variable.


DECLARE @empID int
SELECT @empID=max(emp_id)
FROM employee
SELECT new_empID=@empID

In the first line DECLARE keyword declare a variable empID of int type, and in second line the maximum value of emp_id attributes from employee table stored in the empID variable



Global Variables: Global variable are system-supplied and predefined. These variables are distinguished from local variables by having two @ signs preceding their names

Previous Home Next