Giter Site home page Giter Site logo

kadir-code / sql_server Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 1.0 27 KB

This repository contains sql studies, stored procedures ,triggers, etc and sample databases.

Home Page: https://github.com/kadir-code/Sql_Server

License: MIT License

TSQL 100.00%
sql sql-server-database stored-procedure user-defined-functions view sql-views procedures database indesign fragmentation

sql_server's Introduction

Sql_Server

This repository contains sql studies, stored procedures and sample databases.

For more detailed information, you can check my gitbok page. https://a-kadirerat.gitbook.io/sql/

Views

It is used in places such as writing a complex query once and then calling a normal table, shortening the query time.

Create View --NewTableName
As
Select --NeededColumns From --SelectedTable

Functions

Functions are expressions that can return a specified value type. Functions have only output parameters and can only be used with a select query.

Create Function --functionName(parameters if exist)
Returns --Int-Nvachar
As
Begin
Return Select --Expression
End

Stored Procedures

Stored procedures are expressions that are stored by the database and can be used again when needed after compilation. Since the expression is saved in the database, it does not need to be compiled again. Sp's do not always have to return a value. They have both input and output parameters. Sp's can perform all CRUD operations.

Create Procedure --procedureName
As
Begin
Select --NeededColumns From --SelectedTable
End

Execute --procedureName

Triggers

A trigger structure is a special type of store procedure that automatically runs before or when certain events occur in a table in relational database management systems. The trigger structure is used when an insertion, update or deletion of a table occurs or before certain operations are requested to be performed on the same table or another table.

Create Trigger --triggerName On --SelectedTable
--After Insert or Instead Of
As
Begin
Select --NeededColumns From --SelectedTable
End

--Execution Query

sql_server's People

Contributors

kadir-code avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

burakkylmz

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.