Posts

Showing posts with the label sql

Auto increment Column in Oracle

Image
To day I will show you how to create Auto increment column in oracle which may be use as Primary Key . In My Sql and Sql Server Data bases it very easy to create auto increment column but in oracle you must have to follow some step to Create an Auto increment column.

Log/Audit Table in Oracle and SQL SERVER

Image
Today i will explain you Why we  create Log/Audit table, How it helps us in various situations and How to create Log table and audit table. In this tutorial we will Learn  How to create Trigger  in Oracle and Sql server. In this article I use both databases Oracle and SQL Server . By creating log tables, data base automatically logging of changes to several of our database tables.

Get Client IP Address, Host name and Current User in Oracle and SQL Server

Image
Today I show how to get Client IP Address, Host name and Current Data base user in Sql Server and Oracle . It is very useful for security purposes and in case of any illegal or unauthorized activity is performed on your database so you can Track and Trace how, when  and who performed that  illegal or unauthorized activity.

SQL Server 2008:How To Create User Defined Functions in SQL

Image
To day i will Show you  how to Create User defined Function SQL Server and how to Use it. I've already shared  how create Store Procedures and How to Get a Return Value From Store Procedures in SQL Server . Store Procedure ,User Define Function and User Define or User Created Views are Always Saved in the Data Base (MDF file). They are all Fast and Pre-Compiled which means we call these Functions or Store Procedures  From Our business logic layer or (Simply from Coding ) where they are Directly Executed and thus which Saves time. Difference of time saving is noticible in enviorments where you have 25-30 tables and Each table has 1,000-50,000 rows, in these Situations we Feel the Difference between In-Line Queries and Pre-Compiled SQL Statements(Store Procedure ,User Define Function and User Define or Created Views  etc).