0% found this document useful (0 votes)
8 views

Git - SQL - SQL

The document discusses database concepts like BCP for copying large amounts of data, constraints for specifying rules for data processing, CTEs for creating temporary result sets, cursors for processing rows individually, indexes for helping speed up searches and comparisons, injection attacks regarding parameters for stored procedures, joins for combining rows from related tables, primary keys vs unique constraints, stored procedures for code reuse and better security, scalar functions for simplifying code, subqueries for nested queries, table scans for reading all rows to extract those meeting criteria, temp tables with different scopes, and triggers for defining actions.

Uploaded by

Alejandro Caruso
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Git - SQL - SQL

The document discusses database concepts like BCP for copying large amounts of data, constraints for specifying rules for data processing, CTEs for creating temporary result sets, cursors for processing rows individually, indexes for helping speed up searches and comparisons, injection attacks regarding parameters for stored procedures, joins for combining rows from related tables, primary keys vs unique constraints, stored procedures for code reuse and better security, scalar functions for simplifying code, subqueries for nested queries, table scans for reading all rows to extract those meeting criteria, temp tables with different scopes, and triggers for defining actions.

Uploaded by

Alejandro Caruso
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

BCP copy large amount data

CharIndex char position


Constraint Specify some sort of RULES for processing data
limit Type of data that can go into a table
CTE TEMPORARY RESULSET from Select
Cursor Group Rows
Process row individualy
Delete CTE + Row Position
Error Handling Try CATCH ...JUMP
FK link two Tables
Having Only with Select
used in GROUP BY clause
behaves WHERE clause
Identity column Autoincremental number
Index Clustered PK
One per TBL
Non Clustered Structure separate / each key value pointer
Unique ensure all values diferent
help speed searching comparations
Injection attack Parameters for Stored Procedures
Join combine rows based related tables
NVarchar VS Varchar Nvarchar store UNICODE CHARACTERS...take MORE SPACE
PK vs UNIQUE PK only One
PK not allow NULL value
Procedure code Reuse
Better Security
Reduce Network Trafic
Encapsule Logic
Scalar function 1 or + parameter
Return One
Simplify Code
SubQuery nested inside main QRY
TABLE SCAN read all rows, extract rows meet criteria query
Table-Value User defined
VIEW PARAMETERITED
Temp Table GLOBAL Visible ALL USERS
LOCAL scope sesion > 100
VARIABLE Variable scope BATCH < 100 NO IDX
Trigger DB object DEFINE ACTIONS
Union combie result from 2 or more tables
View Logical table

You might also like