Home
Search results “Insert all oracle statement” for the 2013
SQL Tutorial - 13: Inserting Data Into a Table From Another Table
 
07:00
In this tutorial we'll learn to use the INSERT Query to copy data from one table into another.
Views: 229129 The Bad Tutorials
Oracle Tutorial: Multi Table Insert Command, Part 1/3
 
13:35
http://themagnumgroup.net/oracle-developer.htm In this Tech Talk by TMG, Senior Database Consultant Sarada Priya explains how to use the Multi-Table Insert command in an Oracle database. If you are an experienced database administrator, this is a Tech Talk you must view, as the information presented is not commonly known; it will also save you significant time when altering your database code. Part 2 is at http://tmg4.us/multi2 . Questions? Feel free to ask them by going to http://themagnumgroup.net/Message_Form.htm . Enjoy the video.
Views: 1369 TMGvblog
How to Insert Into Table In SQL
 
02:46
Follow this step by step easy tutorial to learn how to insert data into the tables in SQL Server Database via queries. Don't forget to check out our site http://howtech.tv/ for more free how-to videos! http://youtube.com/ithowtovids - our feed http://www.facebook.com/howtechtv - join us on facebook https://plus.google.com/103440382717658277879 - our group in Google+ The data inside the database is held by the tables. The data can be inserted in these tables either by the queries or even with a straightaway Graphical method. In this tutorial we will see both the methods. Step 1 -- Locating the Appropriate Database First of all, we need to locate and expand the database where that particular table is present. After that, expand the table's directory. Then we will insert the data in the Inventory table. If we move into the column section, it can be seen that there are four fields which have to be added, namely the ID, the Product Name, the Quantity and the Price. Step 2 -- Writing query for inserting record Now to insert in table, SQL query would be: Insert into Inventory (id,Product,quantity,price) values (1,'abc',12,255.32); Make sure that each value is separated by a comma. Once done, simply press F5 to execute the query. At the bottom, in the messages section, a message will appear about table rows that have been affected. Step 3 -- Another Method of Insertion We can also insert data in a table by simply giving the values straight away. For that just write the following query: Insert into Inventory values (1,'ab2',30,300.36); Make sure that the values in query in SQL inserted into table are in the same order as the order of columns in the table. Now let's execute this query and in the messages section, you can see the rows that have been affected. To insert in table, SQL queries are required to be written with much care as error can arise if we just miss to insert ellipsis even. Step 4 -- Viewing Table Data Now let's check the table to see if the data has been inserted correctly. For that let us fetch all records from the inventory table and for that, write: Select * from inventory When we execute the query, you can see all the records in the results section below, and they are exactly the same as we mentioned in the query in earlier steps. Step 5 --Alternate Method of inserting data To insert in table, SQL provides another way through which we don't have to write SQL insert into table queries. For that, just right click on the inventory table and choose the 'Edit top 200 rows' option. Step 6 -- Inserting data in Fields Over here, we can start inserting the data in the table straight away, without using the queries. All we have to do is type the records in the fields and press enter to save the changes made in each field. And that is how data is inserted in tables in SQL using insert keyword.
SQL Tutorial - 9: Create Table Statement
 
07:48
In this tutorial we'll learn to create tables in SQL using the CREATE TABLE Statement.
Views: 274768 The Bad Tutorials
BULK COLLECT and FORALL-A PL/SQL Performance Booster
 
25:07
In this Video Tutorial, I have covered 2 great feature in Oracle PL/SQL - BULK COLLECT and FORALL with some demos.
Views: 52786 Anindya Das
SQL Tutorial - 21: The UPDATE Query
 
06:12
In this tutorial we'll check out the UPDATE Query which is used to update/change records in a table.
Views: 78483 The Bad Tutorials
Oracle 11g Hints Overview
 
42:56
In this Video tutorial we will discuss about Optimizer hints in Oracle. What is optimizer hint, when & why its needed. Different Category of hints. Description of mostly used hints. Demonstrate how query plan can change with the influence of hint.
Views: 50539 Anindya Das
SQL Tutorial - 23: The LIKE Operator and Wildcard Characters
 
07:36
In this tutorial we'll check out a few examples of the LIKE Operator along with the wildcard characters (% and _).
Views: 57963 The Bad Tutorials
Oracle Tutorial: Multi Table Insert Command, Part 3/3
 
13:27
http://themagnumgroup.net/oracle-developer.htm This is the final part of our advanced tutorial on the use of the multi-table insert command in Oracle databases. Experienced database administrators will immediately see how this command drastically reduces code size and programming time. Please do not hesitate to be in touch if: 1. You have a question about the tutorial 2. You have a question about SQL Developer 3. Your database has slowed down and you need to troubleshoot it 4. You need training on an Oracle subject by an Oracle-certified trainer. To message us, please go here: http://themagnumgroup.net/Message_Form.htm We look forward to hearing from you!
Views: 932 TMGvblog
C# Tutorial 23: How to use DateTimePicker and save date in Database
 
14:04
Visual C# .NET Controls The Date Time Picker - Date Picker C# - How do I set my datetimepicker date? visual C# - DateTimePicker date to string C# How to compare the time of a DateTimePicker control and the How do I get value from Date time picker and Month calendar C# How to pass values to a dateTimePicker control‎ C# How to change DateTimePicker control to 24h time format ? Getting started with the DateTimePicker Visual Studio 2012 RC - Age calculation from Converting date time picker value into t_time type date time picker‎ - 7 posts DateTimePicker - Visual C# assign SYSTEMTIME to DateTimePicker Control‎ C#
Views: 292203 ProgrammingKnowledge
How to create an user and to grant all privileges to them in Oracle database
 
03:52
This video shows you how to create a new user and to grant privileges to them. Syntax to create a new user: create user username identified by password
Views: 32878 Thamizh arasaN
Oracle username and password and Account unlocking
 
08:37
all education purpose videos
Views: 260888 Chandra Shekhar Reddy
SQL Tutorial - 17: Logical Operators (Part-1)
 
10:42
In this tutorial we'll be checking out some of the most important logical operators.
Views: 53310 The Bad Tutorials
SQL Tutorial - 14: The SELECT Query
 
03:22
In this tutorial we'll talk about the SELECT Statement in SQL that is used to pull data from tables in a database.
Views: 76328 The Bad Tutorials
Connect Excel to Oracle Database
 
05:03
How to connect an Oracle Database to Microsoft Excel. https://www.elance.com/s/edtemb/
Views: 95270 i_marketing
Informatica pre and post sql
 
10:36
Pre-Post SQL properties of source qualifier transformation Pre SQL: The SQL query fires initially when loading to that database. Post SQL: The SQL query fires at the end i.e., after loading the records to the database. Pre and Post SQL to execute SQL statement like Insert, Update, Delete before and after the load. pre SQL means " SQL statement executed using the source connection,before a pipeline is run" and post SQL means " SQL statement executed using the source connection,after a pipeline is run".
Views: 16685 Informatica
tMap Joins and Filtering
 
18:46
The tMap component is part of the Processing family of components. tMap is one of the core components and is primarily used for mapping input data to output data, that is, mapping one Schema to another. As well as performing mapping functions, tMap may also be used to Join multiple inputs, and to write multiple outputs. Additionally, you can Filter data within the tMap component. You can see : http://www.talendbyexample.com/talend-tmap-component-joins.html Thanks to www.talendbyexample.com
Views: 85442 EL-MAHJOUB Eddoua
How to create table, insert values and view the records of the table in Oracle database
 
05:38
This video explains you how to create a new table in database and to insert values in that table. Syntax to create table: create table table name(attribute1 datatype1, attribute2 datatype2,...) Syntax to insert values: insert into table name(attribute1, attribute2..) values(value1, value2,...) OR insert into table name values(value1, value2,...) Syntax for Select statement: select attribute name from table name (To select particular attributes) OR select * from table name (To select all the records from the table)
Views: 1418 Thamizh arasaN
C# Tutorial 10:  How to Link Combobox with Database values
 
08:50
------------------Online Courses to learn---------------------------- Java - https://bit.ly/2H6wqXk C++ - https://bit.ly/2q8VWl1 AngularJS - https://bit.ly/2qebsLu Python - https://bit.ly/2Eq0VSt C- https://bit.ly/2HfZ6L8 Android - https://bit.ly/2qaRSAS Linux - https://bit.ly/2IwOuqz AWS Certified Solutions Architect - https://bit.ly/2JrGoAF Modern React with Redux - https://bit.ly/2H6wDtA MySQL - https://bit.ly/2qcF63Z ----------------------Follow--------------------------------------------- My Website - http://www.codebind.com My Blog - https://goo.gl/Nd2pFn My Facebook Page - https://goo.gl/eLp2cQ Google+ - https://goo.gl/lvC5FX Twitter - https://twitter.com/ProgrammingKnow Pinterest - https://goo.gl/kCInUp Text Case Converter - https://goo.gl/pVpcwL -------------------------Stuff I use to make videos ------------------- Stuff I use to make videos Windows notebook – http://amzn.to/2zcXPyF Apple MacBook Pro – http://amzn.to/2BTJBZ7 Ubuntu notebook - https://amzn.to/2GE4giY Desktop - http://amzn.to/2zct252 Microphone – http://amzn.to/2zcYbW1 notebook mouse – http://amzn.to/2BVs4Q3 ------------------Facebook Links ---------------------------------------- http://fb.me/ProgrammingKnowledgeLearning/ http://fb.me/AndroidTutorialsForBeginners http://fb.me/Programmingknowledge http://fb.me/CppProgrammingLanguage http://fb.me/JavaTutorialsAndCode http://fb.me/SQLiteTutorial http://fb.me/UbuntuLinuxTutorials http://fb.me/EasyOnlineConverter ---------------------------------------------------------------------------- how to bind combobox to textbox in C# ComboBox and TextBox‎ C# How to show combo box selected value in a text box‎ C# selecting an item in combobox and display corresponding Populate combobox from database C# How to get data in combobox from database? Populating a Combobox from a Dictionary How to fill different ComboBoxes in a DataGridView C# code add database column to datagridview combobox C# Populate combobox from database How to get data in combobox from database? Populating a Combobox from a Dictionary How to fill different ComboBoxes in a DataGridView code add database column to datagridview combobox Enter values into combobox from database‎ Enter values into combobox from database‎ C#
Views: 210131 ProgrammingKnowledge
C# Tutorial 6:  Insert/Save data to database
 
13:48
------------------Online Courses to learn---------------------------- Java - https://bit.ly/2H6wqXk C++ - https://bit.ly/2q8VWl1 AngularJS - https://bit.ly/2qebsLu Python - https://bit.ly/2Eq0VSt C- https://bit.ly/2HfZ6L8 Android - https://bit.ly/2qaRSAS Linux - https://bit.ly/2IwOuqz AWS Certified Solutions Architect - https://bit.ly/2JrGoAF Modern React with Redux - https://bit.ly/2H6wDtA MySQL - https://bit.ly/2qcF63Z ----------------------Follow--------------------------------------------- My Website - http://www.codebind.com My Blog - https://goo.gl/Nd2pFn My Facebook Page - https://goo.gl/eLp2cQ Google+ - https://goo.gl/lvC5FX Twitter - https://twitter.com/ProgrammingKnow Pinterest - https://goo.gl/kCInUp Text Case Converter - https://goo.gl/pVpcwL -------------------------Stuff I use to make videos ------------------- Stuff I use to make videos Windows notebook – http://amzn.to/2zcXPyF Apple MacBook Pro – http://amzn.to/2BTJBZ7 Ubuntu notebook - https://amzn.to/2GE4giY Desktop - http://amzn.to/2zct252 Microphone – http://amzn.to/2zcYbW1 notebook mouse – http://amzn.to/2BVs4Q3 ------------------Facebook Links ---------------------------------------- http://fb.me/ProgrammingKnowledgeLearning/ http://fb.me/AndroidTutorialsForBeginners http://fb.me/Programmingknowledge http://fb.me/CppProgrammingLanguage http://fb.me/JavaTutorialsAndCode http://fb.me/SQLiteTutorial http://fb.me/UbuntuLinuxTutorials http://fb.me/EasyOnlineConverter -------------------------------------------------------------------------------- How to: Insert New Records into a Database Database Access with Visual C#.NET sql server - Insert Data into database in C# How to insert Data to Ms SQL server 2008 using C#.net .net - C# insert data into SQL table Using Visual C# and SQL cannot insert data into table..‎ c# import data from text file into sql databse line by line‎ store xml in SQL Server 2008 from C#‎ Using SQL in C# - Cannot insert data into SQL table visual C# - Could not Insert the data using VC# in MYSQl Add, save & retrieve data in SQL insert data in sql 2005 from excel file through c# asp.net‎ insert data into SQL table from pre filled boxes in C# 4.0‎ insert into database unsing ado.net and C#‎ Insert DateTime into SQL Server using C#‎ Searches related to c# insert data into sql c# insert data into sql table c# insert data into sql server inserting data into sql table insert query sql insert statement from another table
Views: 338934 ProgrammingKnowledge
SQL Tutorial - 15: Arithmetic Operators
 
05:14
In this tutorial we'll talk about operators in general and specifically about the five arithmetic operators available in SQL.
Views: 56592 The Bad Tutorials
Subqueries in sql   Part 59
 
14:34
In this video we will discuss about subqueries in sql server. Let us understand subqueris with an example. Please create the required tables and insert sample data using the script below. Create Table tblProducts ( [Id] int identity primary key, [Name] nvarchar(50), [Description] nvarchar(250) ) Create Table tblProductSales ( Id int primary key identity, ProductId int foreign key references tblProducts(Id), UnitPrice int, QuantitySold int ) Insert into tblProducts values ('TV', '52 inch black color LCD TV') Insert into tblProducts values ('Laptop', 'Very thin black color acer laptop') Insert into tblProducts values ('Desktop', 'HP high performance desktop') Insert into tblProductSales values(3, 450, 5) Insert into tblProductSales values(2, 250, 7) Insert into tblProductSales values(3, 450, 4) Insert into tblProductSales values(3, 450, 9) Write a query to retrieve products that are not at all sold? This can be very easily achieved using subquery as shown below. Select [Id], [Name], [Description] from tblProducts where Id not in (Select Distinct ProductId from tblProductSales) Most of the times subqueries can be very easily replaced with joins. The above query is rewritten using joins and produces the same results. Select tblProducts.[Id], [Name], [Description] from tblProducts left join tblProductSales on tblProducts.Id = tblProductSales.ProductId where tblProductSales.ProductId IS NULL In this example, we have seen how to use a subquery in the where clause. Let us now discuss about using a sub query in the SELECT clause. Write a query to retrieve the NAME and TOTALQUANTITY sold, using a subquery. Select [Name], (Select SUM(QuantitySold) from tblProductSales where ProductId = tblProducts.Id) as TotalQuantity from tblProducts order by Name Query with an equivalent join that produces the same result. Select [Name], SUM(QuantitySold) as TotalQuantity from tblProducts left join tblProductSales on tblProducts.Id = tblProductSales.ProductId group by [Name] order by Name From these examples, it should be very clear that, a subquery is simply a select statement, that returns a single value and can be nested inside a SELECT, UPDATE, INSERT, or DELETE statement. It is also possible to nest a subquery inside another subquery. According to MSDN, subqueries can be nested upto 32 levels. Subqueries are always encolsed in paranthesis and are also called as inner queries, and the query containing the subquery is called as outer query. The columns from a table that is present only inside a subquery, cannot be used in the SELECT list of the outer query. Next Video: What to choose for performance? Queries that involve a subquery or a join Text version of the video http://csharp-video-tutorials.blogspot.com/2013/01/subqueries-in-sql-part-59.html Slides http://csharp-video-tutorials.blogspot.com/2013/09/part-59-subqueries-in-sql-server.html All SQL Server Text Articles http://csharp-video-tutorials.blogspot.com/p/free-sql-server-video-tutorials-for.html All SQL Server Slides http://csharp-video-tutorials.blogspot.com/p/sql-server.html All Dot Net and SQL Server Tutorials in English https://www.youtube.com/user/kudvenkat/playlists?view=1&sort=dd All Dot Net and SQL Server Tutorials in Arabic https://www.youtube.com/c/KudvenkatArabic/playlists
Views: 191901 kudvenkat
SQL Inner Join Multiple Tables with SUM Tutorial - SQL 2008/2012/2016/2017
 
18:03
Use inner joins with multiple tables to create reports. Uses aliases, and the SUM aggregate function to demonstrate the flexibility of the join statement. Get the SQL script to create the database and run the exercies in the video here: https://www.qewbi.com/sql/scripts/qewbijoins.zip
Views: 127444 Edward Kench
Reload data into cache automatically when data in the table changes   Part 132
 
12:11
Text version of the video http://csharp-video-tutorials.blogspot.com/2013/02/reload-data-into-cache-automatically.html Slides http://csharp-video-tutorials.blogspot.com/2013/08/part-132-reload-data-into-cache.html All ASP .NET Text Articles http://csharp-video-tutorials.blogspot.com/p/free-aspnet-video-tutorial.html All ASP .NET Slides http://csharp-video-tutorials.blogspot.com/p/aspnet-slides.html All Dot Net and SQL Server Tutorials in English https://www.youtube.com/user/kudvenkat/playlists?view=1&sort=dd All Dot Net and SQL Server Tutorials in Arabic https://www.youtube.com/c/KudvenkatArabic/playlists In Part 130 of asp.net video tutorial, we discussed about reloading data into cache automatically, when the xml file from which the data was initially retrieved, has changed. In this video, we will discuss about reloading data into cache automatically when data in the underlying database table has changed. Please watch Part 131, before proceeding with this video. To load data automatically into cache, when cached data is removed, we need to define a callback method. This callback method will be invoked when the respective item is removed from cache. So, the code to reload and re-cache data can be written in this method. The callback method signature should match, with the signature of "CacheItemRemovedCallback" delegate. The call back method is defined below. public void CacheItemRemovedCallbackMethod(string key, object value, CacheItemRemovedReason reason) { string CS = ConfigurationManager.ConnectionStrings["DBConnectionString"].ConnectionString; SqlConnection con = new SqlConnection(CS); SqlDataAdapter da = new SqlDataAdapter("spGetProducts", con); da.SelectCommand.CommandType = CommandType.StoredProcedure; DataSet ds = new DataSet(); da.Fill(ds); CacheItemRemovedCallback onCacheItemRemoved = new CacheItemRemovedCallback(CacheItemRemovedCallbackMethod); SqlCacheDependency sqlDependency = new SqlCacheDependency("Sample", "tblProducts"); Cache.Insert("ProductsData", ds, sqlDependency, DateTime.Now.AddHours(24), Cache.NoSlidingExpiration, CacheItemPriority.Default, onCacheItemRemoved); } Now, create an instance of "CacheItemRemovedCallback" delegate, and to the contructor pass the name of the callback method, that should be executed automatically when, the cached item is removed. CacheItemRemovedCallback onCacheItemRemoved = new CacheItemRemovedCallback(CacheItemRemovedCallbackMethod); In Part 131, to cache data, we used cache object's, Insert() method that takes 3 parameters, as shown below. Cache.Insert("ProductsData", ds, sqlDependency); Instead, let's use the overloaded version that takes 7 parameters and pass "onCacheItemRemoved" as an argument for "CacheItemRemovedCallback" parameter. Cache.Insert("ProductsData", ds, sqlDependency, DateTime.Now.AddHours(24), Cache.NoSlidingExpiration, CacheItemPriority.Default, onCacheItemRemoved); That's it. We are done. Now, please run the application. When "Get Data" button is clicked for the first time, the data is loaded from database. Once the data is loaded into cache, we always get it from cache when we click "Get Data". Now, execute an update statement on the database table. Notice that, when we click "Get Data" button now, we still get data from cache, but notice that, the updated data is loaded.
Views: 36382 kudvenkat
TSQL: Compare Tables
 
06:53
One approach to comparing two tables with possibly different data
Views: 6346 SQLInSix Minutes
SQL Tutorial- 16: Comparison Operators
 
10:53
In this tutorial we'll check out the comparison operators we'll be required to use most frequently.
Views: 52817 The Bad Tutorials
SQL Tutorial - 10: Creating Tables from Other Tables
 
05:51
In this tutorial we'll learn to use the CREATE TABLE statement to create a table using a preexisting table in the database. Hope you guys had fun watching the tutorial!
Views: 100711 The Bad Tutorials
How to Insert data into database in asp net
 
12:53
You can find more articles on : http://www.codescratcher.com This video is show u how to insert data into database using asp.net 4.0 Script Language : C#
Views: 135496 JAY PATEL
How to Use SQL Server with VB6 (inc. select & insert)
 
16:50
This video shows how to create a simple 1 table database in SQL Server Management Studio and then use Visual Basic 6.0 to access it and insert new records in a simple program. The download link to Microsoft SQL Server Express 2008 R2 can be found on my blog: http://www.martin2k.co.uk/blog/2013_08.php
Views: 47769 Martin Allen
All About Passing Parameters SQL Task - SSIS
 
17:53
https://www.youtube.com/user/masterkeshav This explains SQL Task in SSIS and draws a comparison between how to pass parameter for an ADO.Net Vs OLEDB Connection.
Views: 34279 Keshav Singh
Introduction to Oracle: PL-SQL - Manipulating Table Data with DML Statements
 
04:46
Introduction to Oracle: PL-SQL - Manipulating Table Data with DML Statements
Views: 394 David Hays
How To Create and Populate Tables in SQL Developer
 
03:27
http://softwaredeveloperacademy.com/get-introduction-to-oracle-sql/?utm_source=youtube&utm_medium=video&utm_campaign=isqlpreview - A demonstration of how to create and populate the tables needed for the Introduction to Oracle SQL course.
Views: 13141 Database Star
How To Perform A Text Import With PL/SQL Developer
 
07:58
http://oracletuts.net/ Hey guys! I am TJ Abrahamsen, with OracleTuts. In this video I will show you how you can use PL/SQL Developer from Allround Automations to import a text file, in my case a .CSV file into a simple table. This tool can be used for many types of data imports into an Oracle table. I hope you find the little video helpful. ~ TJ
Views: 23705 oracletuts
What to choose for performance   SubQuery or Joins   Part 62
 
12:26
Text version of the video http://csharp-video-tutorials.blogspot.com/2013/01/what-to-choose-for-performance.html Slides http://csharp-video-tutorials.blogspot.com/2013/09/part-62-what-to-choose-for-performance.html All SQL Server Text Articles http://csharp-video-tutorials.blogspot.com/p/free-sql-server-video-tutorials-for.html All SQL Server Slides http://csharp-video-tutorials.blogspot.com/p/sql-server.html All Dot Net and SQL Server Tutorials in English https://www.youtube.com/user/kudvenkat/playlists?view=1&sort=dd All Dot Net and SQL Server Tutorials in Arabic https://www.youtube.com/c/KudvenkatArabic/playlists What to choose for performance - SubQuery or Joins According to MSDN, in sql server, in most cases, there is usually no performance difference between queries that uses sub-queries and equivalent queries using joins. For example, on my machine I have 400,000 records in tblProducts table 600,000 records in tblProductSales tables The following query, returns, the list of products that we have sold atleast once. This query is formed using sub-queries. When I execute this query I get 306,199 rows in 6 seconds Select Id, Name, Description from tblProducts where ID IN ( Select ProductId from tblProductSales ) At this stage please clean the query and execution plan cache using the following T-SQL command. CHECKPOINT; GO DBCC DROPCLEANBUFFERS; Go DBCC FREEPROCCACHE; GO Now, run the query that is formed using joins. Notice that I get the exact same 306,199 rows in 6 seconds. Select distinct tblProducts.Id, Name, Description from tblProducts inner join tblProductSales on tblProducts.Id = tblProductSales.ProductId Please Note: I have used automated sql script to insert huge amounts of this random data. Please watch Part 61 of SQL Server tutorial, in which we have discussed about this automated script. According to MSDN, in some cases where existence must be checked, a join produces better performance. Otherwise, the nested query must be processed for each result of the outer query. In such cases, a join approach would yield better results. The following query returns the products that we have not sold atleast once. This query is formed using sub-queries. When I execute this query I get 93,801 rows in 3 seconds Select Id, Name, [Description] from tblProducts where Not Exists(Select * from tblProductSales where ProductId = tblProducts.Id) When I execute the below equivalent query, that uses joins, I get the exact same 93,801 rows in 3 seconds. Select tblProducts.Id, Name, [Description] from tblProducts left join tblProductSales on tblProducts.Id = tblProductSales.ProductId where tblProductSales.ProductId IS NULL In general joins work faster than sub-queries, but in reality it all depends on the execution plan that is generated by SQL Server. It does not matter how we have written the query, SQL Server will always transform it on an execution plan. If sql server generates the same plan from both queries, we will get the same result. I would say, rather than going by theory, turn on client statistics and execution plan to see the performance of each option, and then make a decision. In a later video session we will discuss about client statistics and execution plans in detail.
Views: 82027 kudvenkat
Alter database table columns without dropping table   Part 67
 
04:06
In this video, we will discuss, altering a database table column without having the need to drop the table. Let's understand this with an example. Text version of the video http://csharp-video-tutorials.blogspot.com/2013/08/part-67-alter-database-table-columns.html Slides http://csharp-video-tutorials.blogspot.com/2013/09/part-67-alter-database-table-columns.html All SQL Server Text Articles http://csharp-video-tutorials.blogspot.com/p/free-sql-server-video-tutorials-for.html All SQL Server Slides http://csharp-video-tutorials.blogspot.com/p/sql-server.html All Dot Net and SQL Server Tutorials in English https://www.youtube.com/user/kudvenkat/playlists?view=1&sort=dd All Dot Net and SQL Server Tutorials in Arabic https://www.youtube.com/c/KudvenkatArabic/playlists We will be using table tblEmployee for this demo. Use the sql script below, to create and populate this table with some sample data. Create table tblEmployee ( ID int primary key identity, Name nvarchar(50), Gender nvarchar(50), Salary nvarchar(50) ) Insert into tblEmployee values('Sara Nani','Female','4500') Insert into tblEmployee values('James Histo','Male','5300') Insert into tblEmployee values('Mary Jane','Female','6200') Insert into tblEmployee values('Paul Sensit','Male','4200') Insert into tblEmployee values('Mike Jen','Male','5500') The requirement is to group the salaries by gender. To achieve this we would write a sql query using GROUP BY as shown below. Select Gender, Sum(Salary) as Total from tblEmployee Group by Gender When you execute this query, we will get an error - Operand data type nvarchar is invalid for sum operator. This is because, when we created tblEmployee table, the "Salary" column was created using nvarchar datatype. SQL server Sum() aggregate function can only be applied on numeric columns. So, let's try to modify "Salary" column to use int datatype. Let's do it using the designer. 1. Right click on "tblEmployee" table in "Object Explorer" window, and select "Design" 2. Change the datatype from nvarchar(50) to int 3. Save the table At this point, you will get an error message - Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created. You have either made changes to a table that can't be re-created or enabled the option Prevent saving changes that require the table to be re-created. So, the obvious next question is, how to alter the database table definition without the need to drop, re-create and again populate the table with data? There are 2 options Option 1: Use a sql query to alter the column as shown below. Alter table tblEmployee Alter column Salary int Option 2: Disable "Prevent saving changes that require table re-creation" option in sql server 2008 1. Open Microsoft SQL Server Management Studio 2008 2. Click Tools, select Options 3. Expand Designers, and select "Table and Database Designers" 4. On the right hand side window, uncheck, Prevent saving changes that require table re-creation 5. Click OK
Views: 85263 kudvenkat
TSQL: Get Last Row of Data In A Table
 
06:32
Return the final row of data in a table
Views: 6096 SQLInSix Minutes
Oracle Database 12c Security - Oracle Virtual Private Database (VPD)
 
12:29
Learn how to use Oracle Virtual Private Database (VPD) to secure your data. See all lessons at http://skillbuilders.com/12c-TSDP-Tutorial First, Virtual Private Database. What is it? Answer: It's a declarative technique for enforcing security. Typically, it's based on user application context. That was the first limitation of 8i. Backed with 8i context were session-specific. The context variables were sort in the PGA. That means you simply couldn't use this in a web environment. However, global context, with use of 9i, Virtual Private Database became usable for web applications with connection pooling. But whether you're using it to client server or on a three tier environment, it's declarative technique rather than a programmatic technique. I can go behind the back of the application as a DBA and generate predicates to get appended to all SQLs. Select, insert, update, delete the end users. Issue the SQL and I will generate a predicate that filters the access. It's impossible to bypass. All users will have predicates appended to all their code. It doesn't matter whether they're using SQL Plus, Discoverer, Business Objects, Crystal Reports, eBusiness Suites, whatever they're using, I as DBA can filter their access to roles. The end result, different users see different data sets while running the same code and accessing the same tables, hence, the name Virtual Private Database. Different users will think they're seeing a totally different set of tables, but in fact it's one column database, one set of tables hosting a single application shared by all the users. The mechanism - you can apply VPD to tables, to views, to synonyms, and a declarative technique. Once the technique you write a function that generates the predicate, you associate the function with the table. From then on whenever the user issue SQL against that table the Cost-Based Optimizer rewrites the code. The Cost-Based Optimizer rewrites the user SQL to call the function to generate the predicate. The predicate is then appended to the SQL and it's the modified SQL that is parsed and executed. Let's see how this actually works. I'm working here by the way. This is just a perfectly normal 12.1 database. But what I'm going to demonstrate at this point will in fact work on 11g as well. I'm not going to be using any of the 12c enhancements to VPD for this little demonstration. I'll work in the scott schema. What do we have to do? We write a function to generate the predicate string. Create function. And I'll my function vpdf. The function must conform to a fixed specification. It must take two varchar arguments. One of the arguments is intended to be the schema to which the function will be applied. The other argument is the object within the schema to which the function will be applied. And it must return a varchar2, which is the generated predicate. Let's begin. Within this function you can do just about anything. There are some limitations. It's impossible for the function to query or update the table against which the VPD calls here is going to be applied or we violate the rules of purity that we come across so often with PL/SQL. But apart from that, it can do just about anything - including a number of dreadful side effects can be introduced by writing VPD functions. I'm going to do a very simple one on this one. I'll shall simple return immediately a predicate. What predicate? Ename, which is the ename column from this scott.emp table. Ename should equal sys_context. I'll go to the local context, my user end context, and just extract session user. We can see that John has tested this earlier today and therefore the object already was suggesting and he's just dropping it now and cleaning up the recreate. I hope you realize these really are live demonstrations. I'm not just running scripts. I've created a function. What's that function going to do? It's going to return this value here. Test it. Always test it and see what it's actually going to do. I'll select vpdf. I have to give it a couple of arguments. This one will do for now.
Views: 4321 SkillBuilders
Database Tutorial 65 - SQL DELETE Statement - Oracle DBA Tutorial
 
02:03
Database Tutorial 65 - SQL DELETE Statement - Oracle DBA tutorial, Oracle Database Tutorial This video explains about SQL DELETE Statement
Views: 577 Sam Dhanasekaran
GridView insert update delete in asp.net - Part 23
 
23:47
Link for csharp, asp.net, ado.net, dotnet basics and sql server video tutorial playlists http://www.youtube.com/user/kudvenkat/playlists Link for text version of this video http://csharp-video-tutorials.blogspot.com/2013/03/gridview-insert-update-delete-in-aspnet.html In this video we will discuss about performing an insert, update and delete on asp.net gridview control using sqldatasource. We will be using tblEmployee table for this demo. SQL script to create and populate this table with sample data is available in Part 13 of asp.net gridview tutorial. Create an asp.net web application. Drag and drop a gridview and a sqldatasource control on WebForm1.aspx. Configure "SqlDataSource1" control 1. Right click on "SqlDataSource1" control and select "Show Smart Tag" 2. Now click on "Configure Data Source" link 3. Select connection string, from the dropdownlist on "Choose your data connection" screen. You need to have a connection string specified in web.config file. 4. Click Next 5. On "Configure the Select Statement" screen, select "tblEmployee" table from dropdownlist. 6. Click on "Advanced" button 7. Select "Generate INSERT, UPDATE and DELETE statements" checkbox and click OK 8. Click Next and Finish Drag and drop gridview control on WebForm1.aspx. Now let us associate "SqlDataSource1" control with "GridView1" control 1. Right click on "GridView1" control and select "Show Smart Tag" 2. Select "SqlDataSource1" from "Choose Data Source" dropdownlist 3. Select "Enable Deleting" and "Enable Editing" checkboxes. At this point "Delete" and "Edit" buttons should appear on the gridview control. We will be using gridview control's footer for inserting a new record. Set "ShowFooter" property of the GridView1 control to "true". This can be done from the properties window, or in the HTML. By default GridView control has generated bound fields to display EmployeeId, Name, Gender and City columns. We need to convert these bound fields into template fields. This can be done very easily using the designer. 1. On the "GridView Tasks" pane click on "Edit Columns" link button. 2. Select "EmployeeId" from "Selected Fields" section and click on "Convert this field into a template field" link 3. Do the same for Name, Gender and City Now modify the template fields in the HTML. Please note 1. In every TemplateField, along with EditItemTemplate and ItemTemplate, we also need FooterTemplate. 2. A dropdownlist is used in EditItemTemplate and FooterTemplate of "Gender" template field, instead of a textbox control. 3. To validate data during edit and insert operations, notice that, we are using validation controls, in EditItemTemplate and FooterTemplate. 4. A linkbutton is used in the footer template of "EmployeeId" template field, to enable the user to insert a new employee row 5. We have used ValidationGroup="Insert" for all the validation controls in FooterTemplates. LinkButton's ValidationGroup is aslo set to "Insert", so that all the validation controls in in FooterTemplates are fired only on Insert LinkButton click. 6. We have set LinkButton's OnClick="lbInsert_Click". 7. After the closing tag of GridView, notice that we are using 2 validationsummary controls, to display all the validation messages in one place. ValidationSummary1 control's ValidationGroup is set to "Insert". ValidationSummary1 control displays all insert related validation errors, and edit related validation errors are displayed using ValidationSummary2 control. Finally copy and paste the following event handler method in WebForm1.aspx.cs protected void lbInsert_Click(object sender, EventArgs e) { SqlDataSource1.InsertParameters["Name"].DefaultValue = ((TextBox)GridView1.FooterRow.FindControl("txtName")).Text; SqlDataSource1.InsertParameters["Gender"].DefaultValue = ((DropDownList)GridView1.FooterRow.FindControl("ddlGender")).SelectedValue; SqlDataSource1.InsertParameters["City"].DefaultValue = ((TextBox)GridView1.FooterRow.FindControl("txtCity")).Text; SqlDataSource1.Insert(); }
Views: 379715 kudvenkat
PART 1 -create block and item using oracle 10g form builder
 
07:12
Oracle 10g partI tutorial - how to create block and item using oracle form builder
Views: 53371 Dr. Girija Narasimhan
PART 5-Oracle 10g Form Builder using  LIST ITEM
 
07:59
list-element, list item value, difference between list item and radio button
Views: 32489 Dr. Girija Narasimhan
Oracle 12c PL/SQL Security New Features - Session 5 of 8 - The New Inherit Privileges Privilege
 
06:47
Learn the Oracle Database 12c Inherit Privileges Privilege. Demonstration and Examples. There's a whole new privilege. The inherit privileges privilege. We indeed inherit any privileges privileged. That's just in privileged of course. Any privileges - system privileges, any privileges is an object privilege or new type objects. We can now assign privileges, grant privileges on users. It limits the owner's inheritance of privileges from the invoker. Oracle Corporation is presumably reasonably happy with the way definer's rights code works and definer's rights code as I demonstrated can be highly dangerous. That hasn't really changed in the current release except is will see with the ability to grant roles to code because in invoker's rights we've got huge differences and that's the inheriting of privileges privilege. If you don't have the inheritance enabled, any attempt to execute invoker's rights code will fail because the definer will not be in able to inherit the rights of the invoker. So I'm going to go straight in to do it and then go through the rest of the slides so we can see the sort of issue. Let me lose 11g and go to 12c. What I shall do is create my low privileged user or drop user dev. I don't think he exists. He doesn't. So I'll create my low privileged user. Grant create session, create procedure, select any table to dev identified by dev. It's the same mechanism I use. The same command I use in 11g. I'm creating a developer with a bare minimum that he needs to do his job, which is writing code that lets people query the database. Then log on as him, comm dev/dev and create my procedure. I'll create a version of the code, create or replace procedure list_emp, author ID current user. Invoker's rights code. Remember, this gives my low privilege user dev the ability to insert something horrible in his code which shall then be executed with the invoker's rights. We create the procedure. Now connect / as sysdba - I'll be the highest possible person there is - set server output on and run the code. Execute dev.list_emp looking for the CLARKS. I can't do it. Even as user sys, I can't run that because of the lack of this new privilege. I can correct the situation. I can grant inherit privileges on user sys - which of course one would never normally do - to dev. So I'm now giving my low privilege user the ability to inherit the privileges of user sys when we are running invoker's rights code. And having done that, the code now succeeds. That's the general principle. Without this inherit any privileges code all that doesn't have any privileges privilege, all your invoker's rights code is now blocked. It simply won't run until you grant that privilege to your trusted user. So without inheritance the invoker's rights code will fail. This privilege is in fact granted by default in 12.1 when a user is created. I believe this is purely for backward compatibility. So you don't have to worry about all your codes ceasing to function the moment you have to upgrade but there's no guarantee that this situation will remain as we go through 12.2, 12.3. Also in upgrade I haven't had the time to test comprehensively every possible method of upgrade but certainly this simple test I've done so far, the privilege does appear to be being granted and we can see it. If we look at who's been granted this privilege so far Select grantee, table_name, privilege from dba_tab_privs where privilege like inherit and we see that straight out of the box inherit privileges on a number of users have been granted to public. They have been granted to public. So if I create a brand new user, I grant connect to jw identified by jw, we will see that in the current release - there he is - inherit has beeen granted to public. In the current release by default, your code will continue to function and Oracle often does this with their [05:46 inaudible] with powerful new features. By default, it's configured so there's no change and in the next release it all changes. That's happened to a quite a few releases, quite a few new features, and it wouldn't surprise me if by the time we get to say 12.2 and certainly by the time we get to 13 this behavior changes. So plan for it and look at that privilege and see who it's been granted to and secure your systems. What you need to do is revoke all the inherit privileges grants that's there by default and then grant inherit any privileges very, very sparingly only to a very few trusted users and that should tighten up the danger of definer's inheriting invoker's rights. So a few trusted schemas, create the code in those schemas only and control this very tightly indeed.
Views: 1545 SkillBuilders
SQL SELECT command I
 
04:59
How to use SQL to SELECT records from a MySQL table.
Views: 118 mobileAppDesignDev
Transactions in SQL
 
02:06
Follow this tutorial to learn how to use Transactions in SQL and see how we can roll back to previous changes done in database. Don't forget to check out our site http://howtech.tv/ for more free how-to videos! http://youtube.com/ithowtovids - our feed http://www.facebook.com/howtechtv - join us on facebook https://plus.google.com/103440382717658277879 - our group in Google+ A transaction in SQL is basically the process of one or more changes being made in the database. In this tutorial we will learn the three basic controls of transactions in SQL which are COMMIT, ROLLBACK, and SAVEPOINT Step 1- Commit Command The Commit command is used to save the changes made in the database. To see its implementation, start by first beginning the transaction. Before starting any Transaction in SQL, we have to write the Begin Transaction statement. After that, write the actual action which is required, for example delete from the employee table, where the salary is greater than $2500. After that, write the Commit keyword which confirms that the query is logically correct and can be executed. The Query in this case would be: begin trandelete from EMP where SAL 2500 commit Now when we run the query, a message appears below the Query Editor which shows the number of rows that have been affected by our query. Step 2- Effect of Commit Command After that, fetch all the records from the employee table and it can be seen that all the records which have a salary above $2500 have been deleted. Step 3- Save Points Now let's examine the SAVE POINT command. To understand the concept, we will take an example of a departmental table. Start writing the query by beginning a transaction and then entering in the "Save Transaction" command followed by the transaction name. After that, let's delete a record with the Department number as 10 and then again save the transaction. This time, define the save point as point2. With that done, delete another department, and save the transaction, defining it as point3. Actual Query would be like this: begin tran save tran point1 delete from DEPT where DEPTNO=10 save tran point2 delete from DEPT where DEPTNO=20 save tran point3 After executing it, 2 rows would get affected. Step 4- Departments Deleted Now, see the department table to view the changes. For that, let's fetch all the records from the table. It can be seen that department "10" and "20" has been deleted from the table. Step 5- Roll Back If we want to track back to the previous changes, we can use the save points created earlier along with the Rollback transaction command. The rollback transaction allows us to remove all the modifications made to the data, either from the start of the transaction or to a defined save point. For that, we will use the rollback transaction statement and define the save point after that. Over here, let's roll back to point number 2. The Query would be: rollback tran point2 select * from DEPT Once we execute the query, and fetch all the records from the table, it can be seen that the table now contains the data up till point number 2 in the query. And this is how we can use Transactions in SQL.
DESCRIBE TABLE IN SQL SERVER
 
00:24
DESCRIBE ORACLE IN SQL SERVER BY khalidXY
Views: 6795 Khalid Fahim
Sql 2012 Alter Table Statement Tutorial
 
02:53
Sql 2012 Alter Table Statement Tutorial
Views: 615 Paul Juverdeanu