Your SlideShare is downloading. ×
Mandatory sql functions for beginners
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Mandatory sql functions for beginners

822
views

Published on

These are the mandatory SQL functions to be known for beginners,if you can master all these functions then I assure you can build any

These are the mandatory SQL functions to be known for beginners,if you can master all these functions then I assure you can build any


0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
822
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
13
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Basic SQL FunctionsData Definition Language:CreateAlterDropData Manipulation Language:InsertDeleteUpdateAlways COMMIT for data manipulation languagesDelete:Deletes the data from table, but the memory for the table still remains and the structure of thetable remains and the data can be retrieved by the DBA. Where condition can be used.Truncate:Truncates the data from table and also removes the memory for the table from server ,thestructure of the table remains and the data truncated cannot be retrieved again. Wherecondition cannot be used.Drop:Drops the table, its data, its memory and the structure of the table completely.V$ parameter:For Utl directory:Select * from v$parameter where name like %utl%For Trace file directorySelect * from v$parameter where name like ‘%user%dump%’
  • 2. Functions to be known mandatory= (Equal To): This function is used as equal to ,i.e inorder to match the records in the table as a directcomparision:Eg: Select * from Employees Where name =’Shravan’!= (Not Equal to) : This function is used as not equal to, inorder to exclude the records<>InNot inLikeNot likeUnionUnion allMinusDistinctSumAvgMaxMinCountGroup byHaving
  • 3. Order byLengthTo_charTo_numberTo_dateTruncSubstrInstrModSign eDecodeTrimLtrimRtrimLpadRpadReplaceRowidRownumNvlAndOrDualCase
  • 4. ABSTranslateJoinsRegExp_ReplaceCreate Statement:Create can be used to create :TableIndexSequenceViewPL/SQL (Procedure,package,function,Trigger)Sequence creation:Create Sequence<seq name> Maxvalue (Optional) Minvalue (Optional) Start with 1 Increment by 1 Cache (Optional)Nextval ->next value Currval-current valueSelect s1.nextval from dualSelect s1.currval from dualTo alter sequence:Alter sequence s1Increment by -3Index:Indexes are of different types, mostly used are
  • 5. UNIQUEBINARYHASHFUNCTIONCreate Index <index_name> on table_name(column name)Views:Views are nothing but collection of tables, once the tables in the view are updated the viewautomatically takes the data from updated tables, by using the select statement every time ithas to join the tables it takes time ,this is avoided using the views.Create or Replace view asSelect * from table1,table2,table3 where table.col1=table2.col3