Home
Search results “Drop index if exist oracle”
MSSQL   Check if index exists and if exists delete it
 
01:57
More: http://howtodomssqlcsharpexcelaccess.blogspot.ca/2016/02/mssql-check-if-index-exists-and-if.html
Views: 525 Vis Dotnet
SQL Course - Beginner to Intermediate
 
01:49:20
SQL Statement Syntax AND / OR SELECT column_name(s) FROM table_name WHERE condition AND|OR condition ALTER TABLE ALTER TABLE table_name ADD column_name datatype or ALTER TABLE table_name DROP COLUMN column_name AS (alias) SELECT column_name AS column_alias FROM table_name or SELECT column_name FROM table_name AS table_alias BETWEEN SELECT column_name(s) FROM table_name WHERE column_name BETWEEN value1 AND value2 CREATE DATABASE CREATE DATABASE database_name CREATE TABLE CREATE TABLE table_name ( column_name1 data_type, column_name2 data_type, column_name3 data_type, ... ) CREATE INDEX CREATE INDEX index_name ON table_name (column_name) or CREATE UNIQUE INDEX index_name ON table_name (column_name) CREATE VIEW CREATE VIEW view_name AS SELECT column_name(s) FROM table_name WHERE condition DELETE DELETE FROM table_name WHERE some_column=some_value or DELETE FROM table_name (Note: Deletes the entire table!!) DELETE * FROM table_name (Note: Deletes the entire table!!) DROP DATABASE DROP DATABASE database_name DROP INDEX DROP INDEX table_name.index_name (SQL Server) DROP INDEX index_name ON table_name (MS Access) DROP INDEX index_name (DB2/Oracle) ALTER TABLE table_name DROP INDEX index_name (MySQL) DROP TABLE DROP TABLE table_name EXISTS IF EXISTS (SELECT * FROM table_name WHERE id = ?) BEGIN --do what needs to be done if exists END ELSE BEGIN --do what needs to be done if not END GROUP BY SELECT column_name, aggregate_function(column_name) FROM table_name WHERE column_name operator value GROUP BY column_name HAVING SELECT column_name, aggregate_function(column_name) FROM table_name WHERE column_name operator value GROUP BY column_name HAVING aggregate_function(column_name) operator value IN SELECT column_name(s) FROM table_name WHERE column_name IN (value1,value2,..) INSERT INTO INSERT INTO table_name VALUES (value1, value2, value3,....) or INSERT INTO table_name (column1, column2, column3,...) VALUES (value1, value2, value3,....) INNER JOIN SELECT column_name(s) FROM table_name1 INNER JOIN table_name2 ON table_name1.column_name=table_name2.column_name LEFT JOIN SELECT column_name(s) FROM table_name1 LEFT JOIN table_name2 ON table_name1.column_name=table_name2.column_name RIGHT JOIN SELECT column_name(s) FROM table_name1 RIGHT JOIN table_name2 ON table_name1.column_name=table_name2.column_name FULL JOIN SELECT column_name(s) FROM table_name1 FULL JOIN table_name2 ON table_name1.column_name=table_name2.column_name LIKE SELECT column_name(s) FROM table_name WHERE column_name LIKE pattern ORDER BY SELECT column_name(s) FROM table_name ORDER BY column_name [ASC|DESC] SELECT SELECT column_name(s) FROM table_name SELECT * SELECT * FROM table_name SELECT DISTINCT SELECT DISTINCT column_name(s) FROM table_name SELECT INTO SELECT * INTO new_table_name [IN externaldatabase] FROM old_table_name or SELECT column_name(s) INTO new_table_name [IN externaldatabase] FROM old_table_name SELECT TOP SELECT TOP number|percent column_name(s) FROM table_name TRUNCATE TABLE TRUNCATE TABLE table_name UNION SELECT column_name(s) FROM table_name1 UNION SELECT column_name(s) FROM table_name2 UNION ALL SELECT column_name(s) FROM table_name1 UNION ALL SELECT column_name(s) FROM table_name2 UPDATE UPDATE table_name SET column1=value, column2=value,... WHERE some_column=some_value WHERE SELECT column_name(s) FROM table_name WHERE column_name operator value
Views: 76 Deji Ogunlaja
[Dropping an Index] 1 -  Dropping an index using the DROP INDEX command
 
02:52
Dropping an Index Given SQL Server tables named Customer_Details and XMLDocument in ABC_Bank database,you will view and practice how to drop an index using Transact-SQL commands 1 - Dropping an index using the DROP INDEX command 2 - Dropping an index created on a PRIMARY KEY Learn more and source code at : http://www.tutorialspoint.edu.vn/sql-server/163-maintaining-indexes/12611-workshop-maintaining-indexes.html
Views: 773 little fire
MySQL alter table drop index
 
00:57
MySQL alter table drop index, borra el indice asociado a una tabla
Views: 1031 Francisco Arce
Oracle SQL Tutorial 13 - How to Add Column Constraints (Attributes)
 
05:55
So far, we have this table declaration: CREATE TABLE users( user_id NUMBER, username VARCHAR(50 CHAR) first_name VARCHAR2(50 CHAR), last_name VARCHAR2(50 CHAR) ) We can run this command see that it works. As we are learning though, we are going to want to be able to recreate our table with different settings and such, but if you try to run this command, it will complain that the table already exists. So we first need to delete this table before we start editing settings. When we get more experienced, we will learn about ways to edit the structure of a table that already exists. To fix this, we can get rid of the table using the DROP TABLE command: DROP TABLE users You can run this every time if you need to practice by adding a semicolon after it. This is how you can tell Oracle that you are putting in another command after it. This is known as a delimiter. When you run the script, it is going to run both commands. Now we can go through and reconsider our table structure. This is fine for starting out because we don't have any important data in our database, but once your database is in production you are not going to want to just drop tables. In the last video we discussed different constraints that you can apply to columns in a database table, but how do you actually apply these when you are creating a table? The first way you define constraints is to put them right after the column in your CREATE TABLE statement. CREATE TABLE users( username VARCHAR2(50 CHAR) NOT NULL ) When we define constraints this way, we usually say we are adding column attributes. If you have two constraints you want to add, you just put one after the other with spaces in between. There is no particular order that is required. CREATE TABLE users( username VARCHAR2(50 CHAR) NOT NULL UNIQUE ) In this situation we have already given the column the NOT NULL and UNIQUE attributes, so we should consider making this a primary key: CREATE TABLE users( username VARCHAR2(50 CHAR) PRIMARY KEY ) As you can see, adding column attributes is super easy. We can add a default like this: CREATE TABLE users( username VARCHAR2(50 CHAR) PRIMARY KEY, account_balance NUMBER DEFAULT 0 ) Note that now we need the comma after the first row. There are a few constraints we did not talk go through an example, specifically foreign keys and check constraints. We will be adding these constraints to our database in future videos. In the mean time, I have a thought for you… Many people prefer to name their column constraints. That way, we can refer to certain constraints by name. For example, we might have a primary key constraint that could be named users_pk. The way we are creating these constraints does not allow for this feature, so in the next video we are going to be discussing different ways to create constraints. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support me on Patreon! http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 23683 Caleb Curry
Oracle SQL Tutorial 19 - ON DELETE (SET NULL and CASCADE)
 
05:59
Welcome everyone! Something you need to consider when you are creating foreign keys is what happens if you delete the parent? As a reminder, the parent is the row that has the value you are referencing in the row that has a foreign key. Why is this something important to consider? It's important because foreign keys need to protect us from two primary things, unacceptable INSERT statements, and unacceptable DELETE statements. Let's see what happens when we try to insert incorrect data into the table with the foreign key: INSERT INTO projects VALUES (1, 'Update website homepage', 'CalebCurry') The response tells us plainly that there is no such user in the users table. So this works correctly. Deleting data on the other hand works a bit differently because the database does not know what you want to do with the child row when you delete the parent from the parent table. By default, we will get an error message that prevents the parent from being deleted, but there are some other options. How do we configure this? This is where the ON DELETE statement comes in. We add the keywords ON DELETE right after the foreign key and then we can give it the option of CASCADE or SET NULL. CASCADE means that if we delete the parent, we are also going to delete the child. In our situation what that means is that if somebody creates a project in our project table and then that persons account gets deleted, all of the projects he owns will also be deleted. CASCADE: CREATE TABLE projects( project_id NUMBER, Project_name VARCHAR2(50 CHAR) UNIQUE, creator VARCHAR2(50 CHAR) NOT NULL, CONSTRAINT projects_pk PRIMARY KEY (project_id), CONSTRAINT projects_users_fk FOREIGN KEY (creator) REFERENCES users (username) ON DELETE CASCADE ) SET NULL will take the value in the child table and get rid of it. What you are left with is NULL. This means that we have an orphaned child. The first thought you might have is that it is a bad thing to have an orphaned child, but in databases that is not always so. In our application if we had it set to SET NULL, when a user account gets deleted the projects would remain in existence they would just lack a creator. This might be a good thing if you are concerned about the long term survival of a project, this might be the route you want to go. It ultimately depends on the application purpose. If you don't like CASCADE or SET NULL, you can leave the entire ON DELETE statement and just have Oracle throw an error when a parent is deleted. As for us, we are going to use ON DELETE CASCADE. We need to use this with extreme caution. If you are not careful, someday you will run a delete a row and that will cascade through you database deleting a bunch of stuff you didn't want to delete. Stuff happens, so make sure you back up your database every once in eternity. Now, in the last video we started with a database design that had three tables. We've only created two in this video. In the next video we are going to create the next one, which is a little special. Then we'll finish things up by adding some indexes. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support me on Patreon! http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 18251 Caleb Curry
MSSQL - Understanding Isolation Level By Example (Serializable)
 
08:46
Example SQL Statements below used in the video, you can Copy and Paste for Transaction Isolation Level of Serializable, Read Committed, Read Uncommitted, Repeatable Read --===================================== -- Windows/Session #1 --===================================== SELECT @@SPID IF EXISTS (SELECT 1 FROM sys.tables WHERE name = 'SampleTable') DROP TABLE SampleTable CREATE TABLE [SampleTable] ( [Id] [int] IDENTITY(1,1) NOT NULL, [Name] [varchar](100) NULL, [Value] [varchar](100) NULL, [DateChanged] [datetime] DEFAULT(GETDATE()) NULL, CONSTRAINT [PK_SampleTable] PRIMARY KEY CLUSTERED ([Id] ASC) ) INSERT INTO SampleTable(Name, Value) SELECT 'Name1', 'Value1' UNION ALL SELECT 'Name2', 'Value2' UNION ALL SELECT 'Name3', 'Value3' SELECT * FROM SampleTable BEGIN TRAN INSERT INTO SampleTable(Name, Value) VALUES('Name4', 'Value4') --UPDATE SampleTable SET Name = Name + Name --UPDATE SampleTable SET Name = Name + Name WHERE Name = 'Name1' UPDATE SampleTable SET Name = Name + Name WHERE ID = 2 DELETE FROM SampleTable WHERE ID = 4 WAITFOR DELAY '00:0:10' COMMIT TRAN --===================================== -- Windows/Session #2 --===================================== --------------------------------------------------- -- This window/session is default READ COMMITTED -- --------------------------------------------------- SELECT @@SPID BEGIN TRAN SELECT * FROM SampleTable WAITFOR DELAY '00:00:10' SELECT * FROM SampleTable WAITFOR DELAY '00:00:10' SELECT * FROM SampleTable ROLLBACK SELECT b.name, c.name, a.* FROM sys.dm_tran_locks a INNER JOIN sys.databases b ON a.resource_database_id = database_id INNER JOIN sys.objects c ON a.resource_associated_entity_id = object_id --===================================== -- Windows/Session #3 --===================================== ----------------------------------------------------- -- This window/session is REPEATABLE READ -- ----------------------------------------------------- SELECT @@SPID SET TRANSACTION ISOLATION LEVEL REPEATABLE READ BEGIN TRAN SELECT * FROM SampleTable WAITFOR DELAY '00:00:10' SELECT * FROM SampleTable WAITFOR DELAY '00:00:10' SELECT * FROM SampleTable COMMIT TRAN --===================================== -- Windows/Session #4 --===================================== ----------------------------------------------------- -- This window/session is SERIALIZABLE -- ----------------------------------------------------- SELECT @@SPID SET TRANSACTION ISOLATION LEVEL SERIALIZABLE BEGIN TRAN SELECT * FROM SampleTable WAITFOR DELAY '00:00:10' SELECT * FROM SampleTable WAITFOR DELAY '00:00:10' SELECT * FROM SampleTable COMMIT TRAN
Views: 13836 CodeCowboyOrg
Index DISABLE
 
07:03
Index Disable Index Rebuild
Views: 167 Yusuf Kahveci
PL/SQL tutorial 77: Forall statement with Lower & Upper bound in Oracle Database
 
07:17
Learn how to use PL/SQL FORALL statement Lower and Upper Bound Clause for bulk data processing in Oracle Database by Manish Sharma ------------------------------------------------------------------------ ►►►LINKS◄◄◄ Blog: http://bit.ly/forall-2 You can also read the latest blog in Database Concept series http://bit.ly/the-DBMS Previous Tutorial ►Intro to FORALL https://youtu.be/8HMd7fZQNHs ►Associative Array https://youtu.be/wGXeD_oWxUk ------------------------------------------------------------------------- ►Make sure you SUBSCRIBE and be the 1st one to see my videos! ------------------------------------------------------------------------- ►►►Find me on Social Media◄◄◄ Follow What I am up to as it happens on https://twitter.com/rebellionrider http://instagram.com/rebellionrider https://plus.google.com/+Rebellionrider http://in.linkedin.com/in/mannbhardwaj/ ___Facebook Official Page of Manish Sharma___ https://www.facebook.com/TheRebellionRider/ ___Facebook Official Page of RebellionRider.com___ https://www.facebook.com/RebellionRider.official/ You can also Email me at for E-mail address please check the About section Please please LIKE and SHARE my videos it makes me happy. Thanks for liking, commenting, sharing and watching more of our videos This is Manish from RebellionRider.com ♥ I LOVE ALL MY VIEWERS AND SUBSCRIBERS
Views: 6621 Manish Sharma
Difference between Delete and Truncate and Drop in Oracle Sql
 
14:04
This is a free tutorial on understanding difference between drop, delete and truncate statements. I have tried to cover most of the major difference between all these three statements and have also shown the same with simple and easy to understand examples. Hope it will be helpful to all. If you want more such videos of exciting and amazing 'difference between' concepts, check out the links below : union and union all : https://youtu.be/n9FqQOd8liY char and varchar2 : https://youtu.be/039qzwjWf4k replace and translate : https://youtu.be/HKYF77BGzOE procedure and function : https://youtu.be/q3LmOenL120 in and exists : https://youtu.be/REX4IjRYlFw rank and dense_rank : https://youtu.be/WGSX998hZ9M %type and %rowtype : https://youtu.be/MlLUFeZ_3eM
Views: 1949 Kishan Mashru
SQL for Testers or Test Analysts
 
02:03:07
• SQL can execute queries against a database • SQL can retrieve data from a database • SQL can insert records in a database • SQL can update records in a database • SQL can delete records from a database • SQL can create new databases • SQL can create new tables in a database • SQL can create stored procedures in a database • SQL can create views in a database • SQL can set permissions on tables, procedures, and views SQL Keywords Keyword Description ADD Adds a column in an existing table ADD CONSTRAINT Adds a constraint after a table is already created ALTER Adds, deletes, or modifies columns in a table, or changes the data type of a column in a table ALTER COLUMN Changes the data type of a column in a table ALTER TABLE Adds, deletes, or modifies columns in a table ALL Returns true if all of the subquery values meet the condition AND Only includes rows where both conditions is true ANY Returns true if any of the subquery values meet the condition AS Renames a column or table with an alias ASC Sorts the result set in ascending order BACKUP DATABASE Creates a back up of an existing database BETWEEN Selects values within a given range CASE Creates different outputs based on conditions CHECK A constraint that limits the value that can be placed in a column COLUMN Changes the data type of a column or deletes a column in a table CONSTRAINT Adds or deletes a constraint CREATE Creates a database, index, view, table, or procedure CREATE DATABASE Creates a new SQL database CREATE INDEX Creates an index on a table (allows duplicate values) CREATE OR REPLACE VIEW Updates a view CREATE TABLE Creates a new table in the database CREATE PROCEDURE Creates a stored procedure CREATE UNIQUE INDEX Creates a unique index on a table (no duplicate values) CREATE VIEW Creates a view based on the result set of a SELECT statement DATABASE Creates or deletes an SQL database DEFAULT A constraint that provides a default value for a column DELETE Deletes rows from a table DESC Sorts the result set in descending order DISTINCT Selects only distinct (different) values DROP Deletes a column, constraint, database, index, table, or view DROP COLUMN Deletes a column in a table DROP CONSTRAINT Deletes a UNIQUE, PRIMARY KEY, FOREIGN KEY, or CHECK constraint DROP DATABASE Deletes an existing SQL database DROP DEFAULT Deletes a DEFAULT constraint DROP INDEX Deletes an index in a table DROP TABLE Deletes an existing table in the database DROP VIEW Deletes a view EXEC Executes a stored procedure EXISTS Tests for the existence of any record in a subquery FOREIGN KEY A constraint that is a key used to link two tables together FROM Specifies which table to select or delete data from FULL OUTER JOIN Returns all rows when there is a match in either left table or right table GROUP BY Groups the result set (used with aggregate functions: COUNT, MAX, MIN, SUM, AVG) HAVING Used instead of WHERE with aggregate functions IN Allows you to specify multiple values in a WHERE clause INDEX Creates or deletes an index in a table INNER JOIN Returns rows that have matching values in both tables INSERT INTO Inserts new rows in a table INSERT INTO SELECT Copies data from one table into another table IS NULL Tests for empty values IS NOT NULL Tests for non-empty values JOIN Joins tables LEFT JOIN Returns all rows from the left table, and the matching rows from the right table LIKE Searches for a specified pattern in a column LIMIT Specifies the number of records to return in the result set NOT Only includes rows where a condition is not true NOT NULL A constraint that enforces a column to not accept NULL values OR Includes rows where either condition is true ORDER BY Sorts the result set in ascending or descending order OUTER JOIN Returns all rows when there is a match in either left table or right table PRIMARY KEY A constraint that uniquely identifies each record in a database table PROCEDURE A stored procedure RIGHT JOIN Returns all rows from the right table, and the matching rows from the left table ROWNUM Specifies the number of records to return in the result set SELECT Selects data from a database SELECT DISTINCT Selects only distinct (different) values SELECT INTO Copies data from one table into a new table SELECT TOP Specifies the number of records to return in the result set SET Specifies which columns and values that should be updated in a table TABLE Creates a table, or adds, deletes, or modifies columns in a table, or deletes a table or data inside a table TOP Specifies the number of records to return in the result set TRUNCATE TABLE Deletes the data inside a table, but not the table itself UPDATE Updates existing rows in a table VALUES Specifies the values of an INSERT INTO statement VIEW Creates, updates, or deletes a view WHERE Filters a result set to include only records that fulfill a specified condition
Views: 69 BlueSky Citadel
Difference Between Delete and Truncate
 
03:41
Below is link for Useful Pl/SQL Books http://goo.gl/XMy0tt ---------------------------------------------------------- Difference Between Delete and Truncate in Detail On bigger picture they serve the same purpose but there are many Differences listed with examples Point Delete Truncate 1. Data Recovery Delete: Come under the DML Category, we need to commit or Rollback explicitly to make the changes permanent, so we can recover the data by Rollback command fully with in a session or up to a point if Save Points are used Fall In DDL Category (DDL Command issue the Auto commit implicitly) so no chances of Recovery even not using the Flashback table method. But Truncate operations are also logged , they didn’t generate redo SQL but they are logged , view for truncated data info V$LOGMNR_CONTENTS 2. Data Removal Delete Can remove all or selected data using the Where Clause predicates. Or we can say delete any subset of rows We can Truncate complete table or a partition or sub partition of a table. 3. Speed Delete is Slower because oracle maintain the redo logs for Read Consistency (so that every session connected can see a consistent data at a given point of time ) Delete is very time consuming activity especially when table have numerous indexes and Triggers associated with table Faster as no data logs are maintained no associated trigger firing. 4. DML Triggers Firing DML (Delete) triggers associated with table will fire. DML Trigger will not fire in case of truncate method. 5. Flashback Technology Data can be recovered even after commit operation using Flashback Table options Flashback_transaction_query table will give what to recover and up to which point. Data cannot be recovered in truncate method by Flashback table option. 6. Referential Integrity Constraint Behavior if we don’t have related data in child table then we can delete the data from the parent table or we have variants like On Delete Cascade & on Delete set Null. We can’t truncate a table with enable Referential Integrity Constraint, even there is no data in the child table, we have to disable or drop the constraint if we want to truncate the table. Exception: Truncate is possible if the FK is self-referential means primary key and foreign key are on the same table. 7. Space De allocation or Space Utilization No extent reset with delete when deleting rows from a table, extents are not de allocated, So if there were 50 extents in the table before the deletion, there will still be 50 after the deletion. Truncate: When a table is truncated it will free the space allocated except in case of reuse storage clause. This space can subsequently be used only by new data in the table or cluster resulting from insert or update operations .All extents are de allocated leaving only the extents specified when the table was originally created .Example So if the table was originally created with min extents 3, there will be 3 extents remaining when the tables is truncated. When you truncate a table, NEXT is automatically reset to the last extent deleted. 8. High Water Mark Delete will not reset the high water mark Truncate will reset the High Water mark which is very important for performance point of view as in case of full table scan and full index scan oracle will read all the block under high water mark this makes a lot of difference in terms of performance. 9. Cluster No as such restriction with delete. You cannot individually truncate a table that is part of a cluster. You must truncate the cluster, Delete all rows from the table, or drop and re-create the table. 10. Information Capturing Delete : we can capture the row information what we have deleted using Delete Method, f you are deleting multiple records then use composite data types (collections & records) Truncate Don’t have this feature of capturing the deleted records. 11. Function Based Index Impact DELETE You cannot delete rows from a table if a function-based index on the table has become invalid. You must first validate the function-based index. Truncate: No as such restriction 12. UNUSABLE Indexes Delete no as such feature. Truncate if table is not empty then truncate make all unusable indexes to useable. 13. Complex views You cannot delete data from a Complex view except through INSTEAD OF triggers. But we can delete data from simple Views and MV. We cannot truncate a view simple or complex but you can truncate MV with special Features like Preserve MV Logs and Purge MV Logs. 14. Privileges Delete You need to provide delete table privilege on object. Truncate you must have drop table privilege there is no truncate table privilege exists. 15. Domain Index No as such restriction You cannot truncate the object having domain index in invalid or In progress state
Views: 13779 Ram Gupta
Oracle Sql : Exists Clause
 
21:26
Topic : Exists Clause 19th Video of this Series Comments/Suggestions are welcome get in touch with us, by mailing [email protected] for Upcoming trainings. This is an Unedited Video from the Live sessions on Sql (RDBMS) I will be posting a complete series of these tutorials on this channel, If you would like to be notified every time i post something ; Please subscribe to this channel and press the bell icon.
Views: 64 CodeSmith 001
DIFFERENCES BETWEEN IN AND EXISTS OPERATOR
 
18:11
IN AND EXISTS OPERATORS
Views: 2307 SAINAATTH PITTLA
EXISTS Operator in SQL Server Tamil
 
05:05
Click here to Subscribe to IT PORT Channel : https://www.youtube.com/channel/UCMjmoppveJ3mwspLKXYbVlg Specifies a subquery to test for the existence of rows. In this video you can check Exists and Not Exists with Simple Example Explained in Tamil
Views: 443 IT Port
How To Check If Column Exists for a Table Or View in Database in SQL Server - SQL Server Tutorial
 
03:10
On daily basis, we come across this scenario when we have to find out if a column exists for a Table or View in Database. Specially if we are debugging SQL Server Reports/An application, we take a column name or part of it and want to know that from which table this column is used. We can query INFORMATION_SCHEMA.COLUMNS view to get this information. blog post link for scripts used in this video http://sqlage.blogspot.com/2014/01/tsql-how-to-check-if-column-exists-for.html
Views: 5118 TechBrothersIT
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: 264269 The Bad Tutorials
PL/SQL tutorial 79: PL/SQL FORALL statement with VALUES OF clause in Oracle Database
 
10:29
RebellionRider.com presents the latest PL/SQL tutorial on FORALL statement with VALUES OF Bound clause in Oracle Database by Manish Sharma ------------------------------------------------------------------------ ►►►LINKS◄◄◄ Blog: http://bit.ly/forall-4 learn what is a Database management system http://bit.ly/the-DBMS Previous Tutorial ► FORALL with INDICES OF https://youtu.be/N2pv9wyTDqM ------------------------------------------------------------------------- ►Make sure you SUBSCRIBE and be the 1st one to see my videos! ------------------------------------------------------------------------- ►►►Find me on Social Media◄◄◄ Follow What I am up to as it happens on https://twitter.com/rebellionrider http://instagram.com/rebellionrider https://plus.google.com/+Rebellionrider http://in.linkedin.com/in/mannbhardwaj/ ___Facebook Official Page of Manish Sharma___ https://www.facebook.com/TheRebellionRider/ ___Facebook Official Page of RebellionRider.com___ https://www.facebook.com/RebellionRider.official/ You can also Email me at for E-mail address please check the About section Please please LIKE and SHARE my videos it makes me happy. Thanks for liking, commenting, sharing and watching more of our videos This is Manish from RebellionRider.com ♥ I LOVE ALL MY VIEWERS AND SUBSCRIBERS
Views: 4839 Manish Sharma
ORACLE SQL AND PL/SQL INTERVIEW QUESTION : HOW TO CHANGE DATATYPE IN ORACLE SQL?
 
13:16
This video contains a demonstration on how to change the datatype of a column containing data, the video shows two approaches through which any user can easily change the datatype of a column in a table, the video also helps in solving the Oracle ORA-01440 error.
Views: 1141 Kishan Mashru
HAVING clause and difference with GROUP BY & WHERE clause in SQL statement
 
10:17
Using HAVING clause and difference with GROUP BY & WHERE clause in SQL statement Link for scripts on my blog: https://sqlwithmanoj.com/2015/05/23/sql-basics-difference-between-where-group-by-and-having-clause/ Check the whole "SQL Server Basics" series here: https://www.youtube.com/playlist?list=PLU9JMEzjCv14f3cWDhubPaddxRvx1reKR Check my SQL blog at: http://sqlwithmanoj.com/ Check my SQL FB Page at: https://www.facebook.com/sqlwithmanoj
Views: 71937 SQL with Manoj
Oracle Part 15 Stored Proc Conditions and Calls
 
26:13
If conditions, insert statement in SP, call another SP
Views: 4777 Free OpenMentor
How to Resolve Oracle SQL Parent Key Not Found (ORA-02291)
 
05:49
In this video, we’ll explain what the ORA-02291 “parent key not found” error is, see an example, and look at how to resolve it. This error usually happens when we try to insert data into a table. It looks like this: Error is: ORA-02291: integrity constraint (constraint_name) violated - parent key not found So what does this error mean? It means we’re trying to insert data into a child table, and there is no related record in the parent table. If a foreign key has been set up to enforce this relationship, there needs to be a parent to insert a child that refers to it. Watch the video to see an example of this error as well as how to resolve it. For more information on Oracle SQL, refer to the Database Star website here: https://www.databasestar.com/
Views: 4212 Database Star
jQuery datatables get data from database table
 
21:04
Link for all dot net and sql server video tutorial playlists https://www.youtube.com/user/kudvenkat/playlists?sort=dd&view=1 Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2015/08/jquery-datatables-get-data-from.html In this video we will discuss how to use database data with jQuery datatables plugin. There are many ways to get data into DataTables. If the data is small you can retrieve all the data at once and the processing (i.e paging, searching, ordering) is done on the client-side. On the other hand if the database data is large, server-side processing can be enabled. With server-side processing enabled, all paging, searching, ordering actions that DataTables performs are handed off to the server. In this video we will discuss retrieving all the data at once. The datatables plugin performs all the processing (i.e paging, searching, ordering etc) on the client-side. We want to retrieve data from the following database table tblEmployee. The database data should then be displayed using jQuery datatables plugin
Views: 158632 kudvenkat
SQL index
 
13:33
. Index 1) Why indexes? Indexes are used by queries to find data from tables quickly. Indexes are created on tables and views. Index on a table or a view, is very similar to an index that we find in a book. Clustered and Non-Clustered indexes Note that Id column is marked as primary key. Primary key, constraint create clustered indexes automatically if no clustered index already exists on the table and a nonclustered index is not specified when you create the PRIMARY KEY constraint. a clustered index dictates the physical storage order of the data in a table, a table can contain only one clustered index. A clustered index is analogous to a telephone directory Non Clustered Index: A nonclustered index is analogous to an index in a textbook. The data is stored in one place, the index in another place. Difference between Clustered and NonClustered Index: 1. Only one clustered index per table, where as you can have more than one non clustered index 2. Clustered index is faster than a non clustered index, because, the non-clustered index has to refer back to the table, if the selected column is not present in the index. 3. Clustered index determines the storage order of rows in the table, and hence doesn't require additional disk space, but where as a Non Clustered index is stored seperately from the table, additional storage space is required. Unique index is used to enforce uniqueness of key values in the index. Let's understand this with an example. Note: 1. By default, a PRIMARY KEY constraint, creates a unique clustered index, where as a UNIQUE constraint creates a unique nonclustered index. These defaults can be changed if you wish to. 2. A UNIQUE constraint or a UNIQUE index cannot be created on an existing table, if the table contains duplicate values in the key columns. Obviously, to solve this,remove the key columns from the index definition or delete or update the duplicate values. 3. By default, duplicate values are not allowed on key columns, when you have a unique index or constraint. For, example, if I try to insert 10 rows, out of which 5 rows contain duplicates, then all the 10 rows are rejected. However, if I want only the 5 duplicate rows to be rejected and accept the non-duplicate 5 rows, then I can use IGNORE_DUP_KEY option. An example of using IGNORE_DUP_KEY option is shown below.
Views: 16 R K
MySQL 15 - Auto Increment (AUTO_INCREMENT)
 
05:19
If you are using surrogate keys, every row is going to need to have a unique value for this column. The easiest way to do this is to just count upwards. The downside is that every time you insert data you are going to have to know what number to use. Fortunately, there is an easier way, with what is known as an AUTO_INCREMENT column. An AUTO_INCREMENT column is a column in a table that automatically counts upwards. If we set the PK column as an AUTO_INCREMENT column, we do not have to worry about keeping track of the numbers we've already used. Now, you can only have one AUTO_INCREMENT column per table, and you can only have one primary key per table. AUTO_INCREMENT has to be used on a primary key or a unique index. It makes sense to make the primary key column the AUTO_INCREMENT column, but you can create any other column as the AUTO_INCREMENT column as long as it has a UNIQUE index. So, for example, if you wanted to use a natural primary key but wanted to have a column that auto increments, you could do that by making the incrementing column UNIQUE. Now, the AUTO_INCREMENT does not force the data to never change. It is important to understand that the concept of surrogate and natural keys is foreign to the database. The database does not care what kind of key you use, as long as the qualifications are met. There are no keywords that say surrogate. There are no keywords that say natural. These are categories that we've made to help us better communicate about primary keys. An interesting thing you can do with primary keys is that you can make a combination of columns the primary key. This is important when more than one column is required to make something unique. In an intermediary table, instead of having an association ID, we can have the combination of two rows as the primary key. This is known as either a compound or composite primary key. In the situation of using natural keys, composite keys are more common. For example, you could have a shopping website that allows multiple people from the same household to use a certain coupon you sent out. In this situation, you could use the address and the person's name as the natural primary key. How do we reference primary keys? This requires what is known as a foreign key, which we will discuss in the next video. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support me! http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 19863 Caleb Curry
MSSQL -  How to check if Stored Procedure existis and if exists display its definition
 
01:59
Copy code from here: http://howtodomssqlcsharpexcelaccess.blogspot.ca/2016/01/mssql-how-to-check-if-stored-procedure.html
Views: 342 Vis Dotnet
MySQL - phpMyAdmin 4.5.1 Add UNIQUE Constraint To Existing Column
 
05:29
Mysql statement Alter Table to adding a UNIQUE Constraint key to an existing column to avoid duplicate rows
5 PRACTICO EE TABLAS ASOCIADAS JSF - EJB - MYSQ
 
32:13
SCRIPT drop database if exists video_curso; create database video_curso; use video_curso; create table curso( codigo_curso int(11) auto_increment, nombre varchar(20), descripcion varchar(20), primary key(codigo_curso) ); create table alumno( rut varchar(20), nombre varchar(20), apellido varchar(20), carrera varchar(20), codigo_curso int(11), primary key (rut), index(codigo_curso), foreign key(codigo_curso) references curso(codigo_curso) ); insert into curso values(NULL, 'TALLER WEB', 'PHP-BOOTSTRAP'),(NULL,'MATEMATICA','SUMA y RESTAS'); insert into alumno values('1-1','JUAN','PEREZ','INFORMATICA',1); select * from alumno;
Views: 3986 Roman Gajardo
SQL DROP TABLE EXAMPLE
 
01:33
DROP TABLE EXAMPLE DROP TABLE EXAMPLE
Views: 367 Interview DOT
SQL tutorial 60: SQL View in Oracle Database By Manish Sharma RebellionRider
 
07:30
SQL View in Oracle Database. In this tutorial you will learn how to create a vie as well as how to replace a view along with the examples of all the DML e.g. DESCRIBE, SELECT, UPDATE, INSERT and Delete on view by Manish Sharma RebellionRider ------------------------------------------------------------------------ ►►►LINKS◄◄◄ Blog : http://bit.ly/sql-view-in-oracle-database Previous Tutorial ► Tut 5: SELECT statement http://youtu.be/f_mVBVgnqmM ------------------------------------------------------------------------- ►►►Help Me In Getting A Job◄◄◄ ►Help Me In Getting A Good Job By Connecting With Me on My LinkedIn and Endorsing My Skills. All My Contact Info is Down Below. You Can Also Refer Me To Your Company Thanks ------------------------------------------------------------------------- Copy Cloud referral link || Use this link to join copy cloud and get 20GB of free storage https://copy.com?r=kb4rc1 -------------------------------------------------------------------------- ►Make sure you SUBSCRIBE and be the 1st one to see my videos! -------------------------------------------------------------------------- Amazon Wishlist: http://bit.ly/wishlist-amazon ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ►►►Find me on Social Media◄◄◄ Follow What I am up to as it happens on https://twitter.com/rebellionrider https://www.facebook.com/imthebhardwaj http://instagram.com/rebellionrider https://plus.google.com/+Rebellionrider http://in.linkedin.com/in/mannbhardwaj/ http://rebellionrider.tumblr.com/ http://www.pinterest.com/rebellionrider/ You can also Email me at [email protected] Please please LIKE and SHARE my videos it makes me happy. Thanks for liking, commenting, sharing and watching more of our videos This is Manish from RebellionRider.com ♥ I LOVE ALL MY VIEWERS AND SUBSCRIBERS
Views: 43933 Manish Sharma
SQL: WITH Clause
 
06:11
In this tutorial, you'll learn will learn how to use with clause PL/SQL (Procedural Language/Structured Query Language) is Oracle Corporation's procedural extension for SQL and the Oracle relational database. PL/SQL is available in Oracle Database (since version 7), TimesTen in-memory database (since version 11.2.1), and IBM DB2 (since version 9.7).[1] Oracle Corporation usually extends PL/SQL functionality with each successive release of the Oracle Database. PL/SQL includes procedural language elements such as conditions and loops. It allows declaration of constants and variables, procedures and functions, types and variables of those types, and triggers. It can handle exceptions (runtime errors). Arrays are supported involving the use of PL/SQL collections. Implementations from version 8 of Oracle Database onwards have included features associated with object-orientation. One can create PL/SQL units such as procedures, functions, packages, types, and triggers, which are stored in the database for reuse by applications that use any of the Oracle Database programmatic interfaces. PL/SQL works analogously to the embedded procedural languages associated with other relational databases. For example, Sybase ASE and Microsoft SQL Server have Transact-SQL, PostgreSQL has PL/pgSQL (which emulates PL/SQL to an extent), and IBM DB2 includes SQL Procedural Language,[2] which conforms to the ISO SQL’s SQL/PSM standard. The designers of PL/SQL modeled its syntax on that of Ada. Both Ada and PL/SQL have Pascal as a common ancestor, and so PL/SQL also resembles Pascal in several aspects. However, the structure of a PL/SQL package does not resemble the basic Object Pascal program structure as implemented by a Borland Delphi or Free Pascal unit. Programmers can define public and private global data-types, constants and static variables in a PL/SQL package.[3] PL/SQL also allows for the definition of classes and instantiating these as objects in PL/SQL code. This resembles usage in object-oriented programming languages like Object Pascal, C++ and Java. PL/SQL refers to a class as an "Abstract Data Type" (ADT) or "User Defined Type" (UDT), and defines it as an Oracle SQL data-type as opposed to a PL/SQL user-defined type, allowing its use in both the Oracle SQL Engine and the Oracle PL/SQL engine. The constructor and methods of an Abstract Data Type are written in PL/SQL. The resulting Abstract Data Type can operate as an object class in PL/SQL. Such objects can also persist as column values in Oracle database tables. PL/SQL is fundamentally distinct from Transact-SQL, despite superficial similarities. Porting code from one to the other usually involves non-trivial work, not only due to the differences in the feature sets of the two languages,[4] but also due to the very significant differences in the way Oracle and SQL Server deal with concurrency and locking. There are software tools available that claim to facilitate porting including Oracle Translation Scratch Editor,[5] CEITON MSSQL/Oracle Compiler [6] and SwisSQL.[7] The StepSqlite product is a PL/SQL compiler for the popular small database SQLite. PL/SQL Program Unit A PL/SQL program unit is one of the following: PL/SQL anonymous block, procedure, function, package specification, package body, trigger, type specification, type body, library. Program units are the PL/SQL source code that is compiled, developed and ultimately executed on the database. The basic unit of a PL/SQL source program is the block, which groups together related declarations and statements. A PL/SQL block is defined by the keywords DECLARE, BEGIN, EXCEPTION, and END. These keywords divide the block into a declarative part, an executable part, and an exception-handling part. The declaration section is optional and may be used to define and initialize constants and variables. If a variable is not initialized then it defaults to NULL value. The optional exception-handling part is used to handle run time errors. Only the executable part is required. A block can have a label. Package Packages are groups of conceptually linked functions, procedures, variables, PL/SQL table and record TYPE statements, constants, cursors etc. The use of packages promotes re-use of code. Packages are composed of the package specification and an optional package body. The specification is the interface to the application; it declares the types, variables, constants, exceptions, cursors, and subprograms available. The body fully defines cursors and subprograms, and so implements the specification. Two advantages of packages are: Modular approach, encapsulation/hiding of business logic, security, performance improvement, re-usability. They support object-oriented programming features like function overloading and encapsulation. Using package variables one can declare session level (scoped) variables, since variables declared in the package specification have a session scope.
Views: 15461 radhikaravikumar
Oracle Database11g tutorials 14 : How to CREATE TABLE using sql developer and command prompt
 
08:36
Oracle Database11g tutorials 14 How to Create table using command prompt and Create table using sql developer Blog Link http://bit.ly/1TkY4Oe Time Line 0:25 Introduction of Tables in Database 1:03 What is Create Table (Introduction of create table) 1:30 Syntax of Create Table 2:08 How to create table using Command Prompt 4:55 How to create table using SQL Developer Links for Oracle Database tutorials 4: database connectivity using SQL developer and command prompt http://youtu.be/wSqoXRlXDUU You can have indepth knowledge about SQL create table here http://www.rebellionrider.com/sql-create-table.html Tool used in this tutorial is command prompt. This tutorial series is part of SQL expert exam certification training. if you are preparing for SQL certification you can use my tutorials. This SQL Tutorial is a part of free training. Copy Cloud referral link || Use this link to join copy cloud and get 20GB of free storage https://copy.com?r=j7eYO7 Contacts E-Mail [email protected] Twitter https://twitter.com/rebellionrider Instagram http://instagram.com/rebellionrider Facebook. https://www.facebook.com/imthebhardwaj Linkedin. http://in.linkedin.com/in/mannbhardwaj/ Thanks for linking, commenting, sharing and watching more of our videos This is Manish from RebellionRider.com Today in this oracle database tutorial we will see How to CREATE A TABLE. if we have to define a table in layman language then we can say that Tables are just a collection of Rows and Columns but In RDBMS tables are database objects which help in organizing data into ROWS and COLUMNS. We can also say that SQL tables are kind of data structure which are used by database for efficient storage of data. To create a table in our database we use SQL CREATE TABLE command. SQL CREATE TABLE is a type of DATA DEFINITION LANGUAGE also known as DDL. To Create a table in your schema you will require CREATE TABLE system privilege. In our future videos we will see what are system and object privileges and how to grant them to a user. Today for this video we will be using Sample schema HR which already has all the necessary privileges. Ohk Let's see the syntax. CREATE TABLE table name ( column name1 Data-Type(size), column name2 Data-Type(size), ..... ); CREATE TABLE is an oracle reserved word or say an Oracle key word whereas There are 3 different ways of creating a table in Oracle database. Creating a table using Command Line Interface (CLI) in Oracle database For demonstrating how to create table in oracle database using CLI, I'll be using Command prompt. Thats how we create table using command prompt. you can check your table structure by DESCRIBE command for that just write DESC and your table name. Like this Another way of creating a table is by using Graphic user interface (GUI) in Oracle database To demonstrate how to create table using GUI we will use SQL developer. Lets open our SQL developer I am connected to HR schema if you do not know how to create a connection to database using SQL developer please watch my oracle database tutorial 4 that explains database connectivity using SQL developer and command prompt. Link for this video is in the description below. So lets create a table. Creating a table using SQL developer is very easy we do not have to fire any query here. Let's start First of all right click on your connection in which you want to create a table and choose schema browser. This will open a separate schema browser pane or you can expend your connection by clicking this + sign and then right click on table and choose New Table. However I prefer working with schema browser so let's skip to schema browser pane here from the first drop-down list you can choose connection name and in the second drop down list you can choose what database objects you want to work with we want to create a table thus I'll choose table and then click this arrow here and choose option for new table Ok we have created a table wizard first of all give a unique name to your table and add some column as well. For this, click the green plus button. Now we already have a column so give it some name. Also choose a datatype from the list and specify any size you can check this not null column if in case you want to make this a mandatory column you can also specify default value and constraint If you want to make this column a primary key you can click here In my future video i'll show you what are these constraints and different ways of applying them on a column in a table. for this video we will concentrate on create table only so when you are done with all your columns click ok Thats your table You can double click on your table here and can see its structure. Thats it
Views: 186485 Manish Sharma
[CSIS 1550] - MySQL: Views, Users, Indexes and Constraints
 
01:17:30
[CSIS 1550] - MySQL: Views, Users, Indexes and Constraints OVERVIEW This lecture introduces us to various tasks performed by and responsibilities of the database administrator (DBA). * VIEWS * Creating simple views * Creating views from joins * Creating views with custom field names * Pros and Cons of Views * USERS * Creating * Granting rights * Revoking rights * Removing users * Note: Public key word (page 194) does not work * INDEXES * Creating * Dropping * Unique Indexes * Data Integrity * Constraints READING ASSIGNMENT The lecture is based on pages 181 through 205 of the text book ACTIVITIES In class, we will work through several examples together. Each of these exercises will refresh our memories of earlier concepts we've learned, and will further build on them as we create views, users, indexes and constraints. CODE - Views To create a view, use the following structure shown below CREATE VIEW [Give the View a Name] [(enter custom field names, in parenthesis, if you want)] AS [Some query]; For example: CREATE VIEW REP2 (ID, NAME) AS SELECT REP_NUM, CONCAT(FIRST_NAME, " ", LAST_NAME) FROM REP; The above will create a view called "REP2" that uses ID and NAME as the field names. It will give you a view like this: SELECT * FROM REP2; +----+-----------------+ | id | name | +----+-----------------+ | 20 | Kaiser, Valerie | | 35 | Hull, Richard | | 65 | Perez, Juan | +----+-----------------+ Users: creation Creating users is a simple process. Below is the structure: CREATE USER '[Give the User a Name]' IDENTIFIED BY '[Give the User a Password]'; For example: CREATE USER 'Beavis' IDENTIFIED BY 'Password'; Users: access Once a users are created, you can grant them various levels of access using the following structure: GRANT [List Privilege(s) Here] [(field names, if you'd like)] ON [Database Name Here].[Table Name Here] TO [User's Name Here]; For Example, the query below will grant user "Beavis" the ability to select the REP_NUM, FIRST_NAME and LAST_NAME fields from the Rep table in the Premiere database: GRANT SELECT (REP_NUM, LAST_NAME, FIRST_NAME) ON PREMIERE.REP TO 'Beavis'; To revoke access, the syntax is very similiar: REVOKE [List Privilege(s) separated by commas Here] ON [Database Name Here].[Table Name Here] FROM [User's Name Here]; For example, the query below will revoke all privileges on all tables in all databases from user "Beavis." REVOKE ALL ON *.* FROM 'Beavis'; Below is a list of some of the privileges that can be granted or revoked: UPDATE INSERT DELETE SELECT DROP ALTER ALL Indexes Indexes make it much quicker to access records in a database. The syntax for creating, viewing and dropping an index is as follows: CREATE INDEX [Give the Index a Name] ON [Name of the Table] ([Field Name sort direction, Field Name sort direction, etc.]) SHOW INDEX FROM [Table Name]; DROP INDEX [Index Name] ON [TABLE]; For example: CREATE INDEX CustName ON CUSTOMER (CUSTOMER_NAME DESC); SHOW INDEX FROM CUSTOMER; DROP INDEX CustName on CUSTOMER; Unique Index Unique indexes have two purposes. They act as a standard index (see above) They prevent duplicate data entry (much like a primary key) The syntax is identical to the standard index syntax with one exception. The word "UNIQUE" is used in the CREATE query. CREATE UNIQUE INDEX [Give the Index a Name] ON [Name of the Table] ([Field Name sort direction, Field Name sort direction, etc.)] Constraints As a control freak we want to make sure that we protect the data every way we know how. Contraints can be a very useful tool for that very purpose. There are many types of constraints. Here are just a few: * Primary Keys * Foreign Keys * Legal Values Our focus today is on Foreign Keys. Enforcing a Foreign Key Constraint will prevent a user from being able to add a foreign key value in a table if it does not already exist as a Primary Key in a specified table. For example, to prevent users from enter a rep_num value in the customer table that does not exist in the rep table, we can use a foreign key constraint: ALTER TABLE CUSTOMER ADD FORIEGN KEY (REP_NUM) REFERENCES REP(REP_NUM); Currently, the only rep_num values in the rep table are 20, 35 and 65. If a user tries to use the value 75 (for example) in the customer table, the above Constraint prevents that from happening because 75 is not a valid rep_num in the rep table. RESOURCES https://dev.mysql.com/doc/refman/5.7/en/create-view.html https://dev.mysql.com/doc/refman/5.7/en/adding-users.html https://dev.mysql.com/doc/refman/5.7/en/drop-user.html https://dev.mysql.com/doc/refman/5.7/en/create-index.html https://dev.mysql.com/doc/refman/5.5/en/create-table-foreign-keys.html
Views: 187 StoneColdProfessor
Session-Private Statistics for Global Temporary Tables (GTTs) in Oracle 12c
 
02:18
This video the session-private statistics functionality for Global Temporary Tables (GTTs) in Oracle 12c. For more information see: https://oracle-base.com/articles/12c/session-private-statistics-for-global-temporary-tables-12cr1 Website: https://oracle-base.com Blog: https://oracle-base.com/blog Twitter: https://twitter.com/oraclebase Cameo by Enrique Aviles Twitter: https://twitter.com/eaviles94 Cameo appearances are for fun, not an endorsement of the content of this video.
Views: 838 ORACLE-BASE.com
Difference Between Case and Decode
 
06:03
What is the difference between case and decode ? Important links for Oracle Developers For for SQL - PL/SQL Interview Questions Answers Facebook group https://www.facebook.com/groups/146487615764170/ Download Free PLSQL Interview Books , Documents Videos from here https://www.facebook.com/groups/146487615764170/files/ Free SQL / PLSQL Video on YouTube Channel SUBSCRIBE https://www.youtube.com/c/ramguptaoracle?sub_confirmation=1 Visit oracle forms / report / SQL PLSQL blog http://oracletemple.blogspot.in/ Oracle Community Google+ https://plus.google.com/u/0/collection/4mW-jB Join our facebook group https://www.facebook.com/groups/146487615764170/ Follow us on Twitter https://twitter.com/Rameshwar275 Simply Like and Share :) Oracle SQL PLSQL FaceBook group https://www.facebook.com/groups/146487615764170/ ORACLE SQL PLSQL VIDEO LINKS What is Parameterized Cursor in Oracle https://www.youtube.com/watch?v=JMKwHlVi6-A What is autonomous transaction in Oracle. https://www.youtube.com/watch?v=gyvFajpfoWE What are Constraints available in Oracle. https://www.youtube.com/watch?v=WivhdLXQklQ What is Mutation Error and How to avoid mutation. https://www.youtube.com/watch?v=CbWNCyW18Bs 5 Effective way to delete Duplicate rows https://www.youtube.com/watch?v=1wtTtnc87Oc What is Difference between Delete and Truncate https://www.youtube.com/watch?v=7b6wQ3Qumgg What are types of View available in Oracle https://www.youtube.com/edit?o=U&video_id=PN-NsSA2R-E
Views: 4205 Ram Gupta
PL/SQL tutorial 87: Bulk Collect Into with Execute Immediate by Manish Sharma
 
09:39
RebellionRider.com present Bulk Collect into with Execute Immediate of Native Dynamic SQL by Manish Sharma ------------------------------------------------------------------------ ►►►LINKS◄◄◄ Blog: http://bit.ly/nds-8 Previous Tutorial ►Nested Table https://youtu.be/EUYyiFCzU0I ► Bulk Collect statement https://youtu.be/HPVzFBluM_Q ►For Loop https://youtu.be/DfAmnj2j7WI ►Collection Method Count https://youtu.be/NNq80CcC5K8 ------------------------------------------------------------------------- ►Make sure you SUBSCRIBE and be the 1st one to see my videos! ------------------------------------------------------------------------- ►►►Find me on Social Media◄◄◄ Follow What I am up to as it happens on https://twitter.com/rebellionrider http://instagram.com/rebellionrider https://plus.google.com/+Rebellionrider http://in.linkedin.com/in/mannbhardwaj/ ___Facebook Official Page of Manish Sharma___ https://www.facebook.com/TheRebellionRider/ ___Facebook Official Page of RebellionRider.com___ https://www.facebook.com/RebellionRider.official/ You can also Email me at for E-mail address please check the About section Please please LIKE and SHARE my videos it makes me happy. Thanks for liking, commenting, sharing and watching more of our videos This is Manish from RebellionRider.com ♥ I LOVE ALL MY VIEWERS AND SUBSCRIBERS
Views: 3374 Manish Sharma
PL/SQL tutorial 78: PL/SQL FORALL statement with INDICES OF clause in Oracle Database
 
09:19
Checkout this latest PL/SQL tutorial on RebellionRider.com and learn what are the shortcomings of first bound clause (i.e. Lower & Upper Bound) and how we can overcome those shortcomings using INDICES OF bound clause of FORALL statement in Oracle PL/SQL by Manish Sharma. ------------------------------------------------------------------------ ►►►LINKS◄◄◄ Blog: http://bit.ly/forall-3 Bolg is online but you can still learn what is a DBMS http://bit.ly/the-DBMS Previous Tutorial ► FORALL with Lower & Upper Bound https://youtu.be/z5-hSxyUrkk ►PL/SQL FOR LOOP https://youtu.be/DfAmnj2j7WI ►SELECT-INTO statement https://youtu.be/F5eMJhwmCQs ►Nested Table https://youtu.be/EUYyiFCzU0I ------------------------------------------------------------------------- ►Make sure you SUBSCRIBE and be the 1st one to see my videos! ------------------------------------------------------------------------- ►►►Find me on Social Media◄◄◄ Follow What I am up to as it happens on https://twitter.com/rebellionrider http://instagram.com/rebellionrider https://plus.google.com/+Rebellionrider http://in.linkedin.com/in/mannbhardwaj/ ___Facebook Official Page of Manish Sharma___ https://www.facebook.com/TheRebellionRider/ ___Facebook Official Page of RebellionRider.com___ https://www.facebook.com/RebellionRider.official/ You can also Email me at for E-mail address please check the About section Please please LIKE and SHARE my videos it makes me happy. Thanks for liking, commenting, sharing and watching more of our videos This is Manish from RebellionRider.com ♥ I LOVE ALL MY VIEWERS AND SUBSCRIBERS
Views: 5700 Manish Sharma
Oracle SQL Tutorial 22 - Why Primary Keys Shouldn't Change
 
07:14
In the last video I mentioned that with our database design it is important to make sure that nobody tries to update a user's username. What happens if they do? Nothing horrible, Oracle will just throw an error. That's not such a big deal, but if you are hoping to make some kind of application that allows someone to change their username, this is not the best set up. Why? If you look at the projects table, we have a foreign key that references the username. Let's assume for a moment that Oracle allows you to do anything with your data. That means that if a user updates their username, there will be projects created by users that don't exist. Or a user could change their name to the previous owner. To fix this problem, we would need something such as an ON UPDATE CASCADE command for our foreign key. That would mean that if the user updated their username, the columns that reference that username would also update to the new value. This exists in some database management systems, but this does not exist in Oracle at the time of this video. How do we get around this problem? I'm sure we could conjure up something to allow us to update the username, but the easiest solution is to reference the user_id instead of the username. That way, when the username is updated, nothing changes inside of the foreign key. As a general rule, primary keys should never change. Foreign keys CAN change, but they should not change because a primary key changed. So, if we did happen to use a username as a column, it would be frowned upon if the username had to change because the column it references changes. However, it would be acceptable to change the foreign key if we needed to point to a new entity in the users table. Even if a username is never intended to change, these complications bother a lot of people. You can mitigate these problems by only referencing surrogate keys in foreign keys. This has the downside though that when you retrieve the data, you are going to have to do more work to make the data readable. For example, we had a table that was called project_users. It is essentially a table that says what users are part of what projects. We could have the foreign keys reference the project's name and the user's username. Then when you could say SELECT * FROM project_users. The data would be completely readable without doing anything. If you switch to only referencing surrogate primary keys, you will have a bunch of random numbers that don't mean anything and will have to be joined with other tables…which is really super frustrating when later you have to join a thousand tables to read anything. Which side do you prefer? Pick a side. Choose wisely. I'll see you all in the next video ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HELP ME! http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 6428 Caleb Curry
MSSQL - Understanding Isolation Level by Example (Read Uncommitted)
 
06:27
Example SQL Statements below used in the video, you can Copy and Paste for Transaction Isolation Level of Serializable, Read Committed, Read Uncommitted, Repeatable Read --===================================== -- Windows/Session #1 --===================================== IF EXISTS (SELECT 1 FROM sys.tables WHERE name = 'SampleTable') DROP TABLE SampleTable CREATE TABLE [SampleTable] ( [Id] [int] IDENTITY(1,1) NOT NULL, [Name] [varchar](100) NULL, [Value] [varchar](100) NULL, [DateChanged] [datetime] NULL, CONSTRAINT [PK_SampleTable] PRIMARY KEY CLUSTERED ([Id] ASC) ) INSERT INTO SampleTable(Name, Value) SELECT 'Name1', 'Value1' UNION ALL SELECT 'Name2', 'Value2' UNION ALL SELECT 'Name3', 'Value3' SELECT * FROM SampleTable BEGIN TRAN INSERT INTO SampleTable(Name, Value) VALUES('Name4', 'Value4') --UPDATE SampleTable SET Name = Name + Name --UPDATE SampleTable SET Name = Name + Name WHERE Name = 'Name1' UPDATE SampleTable SET Name = Name + Name WHERE ID = 1 WAITFOR DELAY '00:02:00' ROLLBACK --===================================== -- Windows/Session #2 --===================================== --------------------------------------------------- -- This window/session is default READ COMMITTED -- --------------------------------------------------- SELECT * FROM SampleTable SELECT * FROM SampleTable WITH (NOLOCK) SELECT * FROM SampleTable WHERE ID = 3 SELECT * FROM SampleTable WHERE Name = 'Name2' SELECT b.name, c.name, a.* FROM sys.dm_tran_locks a INNER JOIN sys.databases b ON a.resource_database_id = database_id INNER JOIN sys.objects c ON a.resource_associated_entity_id = object_id --===================================== -- Windows/Session #3 --===================================== ----------------------------------------------------- -- This window/session is default READ UNCOMMITTED -- ----------------------------------------------------- SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED SELECT * FROM SampleTable SELECT * FROM SampleTable SELECT * FROM SampleTable WHERE ID = 2 SELECT * FROM SampleTable WHERE Name = 'Name2' SELECT * FROM SampleTable WITH (NOLOCK)
Views: 9383 CodeCowboyOrg
VIEWS IN ORACLE SQL WITH EXAMPLES
 
15:13
This video explains about views in Oracle SQL, views are integral part of any database, and its important to clearly understand views to work with them. Views are named and stored sql statements which would be executed once we call the view, views in whole do not store the data except if its a Materialized view. Views are widely used in day to day programming and can be useful in various cases, we discussed about all those cases in this video. If you would like to learn more on materialized view, visit the below videos https://youtu.be/7PklhTCNxxw https://youtu.be/EDf8Pk-x_nA If you want to know the difference between views and Materialized view, visit https://youtu.be/BnNKws_7_jc Visit our blog at www.oracleplsqlblog.com All out youtube videos: www.youtube.com/c/kishanmashru
Views: 1636 Kishan Mashru
Урок 3 : Выборка данных SELECT и DDL объект ALTER - MS SQL
 
11:37
1. SELECT , DISTINCT 2. FROM , WHERE (IN , NOT IN , LIKE , NOT LIKE , EXISTS , NOT EXISTS ) 3. DECLARE 4. ALTER TABLE
Views: 411 FoxLip News
T-SQL - Delete Statement
 
02:13
T-SQL - Delete Statement Watch more Videos at https://www.tutorialspoint.com/videotutorials/index.htm Lecture By: Mr. Anadi Sharma, Tutorials Point India Private Limited
SQL Database Fundamentals for Data Science - By Microsoft
 
03:03:47
SQL is an essential skill to have in every data scientist. You should have sql skill and better understanding. In this complete SQL course you will learn about the following. SQL Query Types SELECT Statement Retrieve records from a table SELECT LIMIT Statement Retrieve records from a table and limit results SELECT TOP Statement Retrieve records from a table and limit results INSERT Statement Insert records into a table UPDATE Statement Update records in a table DELETE Statement Delete records from a table TRUNCATE TABLE Statement Delete all records from a table (no rollback) UNION Operator Combine 2 result sets (removes duplicates) UNION ALL Operator Combine 2 result sets (includes duplicates) INTERSECT Operator Intersection of 2 result sets MINUS Operator Result set of one minus the result set of another EXCEPT Operator Result set of one minus the result set of another SQL Comparison Operators Comparison Operators Operators such as greater than, less than and so on SQL Joins JOIN Tables Inner and Outer joins SQL Aliases ALIASES Create a temporary name for a column or table SQL Clauses DISTINCT Clause Retrieve unique records FROM Clause List tables and join information WHERE Clause Filter results ORDER BY Clause Sort query results GROUP BY Clause Group by one or more columns HAVING Clause Restrict the groups of returned rows SQL Functions COUNT Function Return the count of an expression SUM Function Return the sum of an expression MIN Function Return the min of an expression MAX Function Return the max of an expression AVG Function Return the average of an expression SQL Conditions AND Condition 2 or more conditions to be met OR Condition Any one of the conditions are met AND & OR Combining AND and OR conditions LIKE Condition Use wildcards in a WHERE clause IN Condition Alternative to multiple OR conditions NOT Condition Negate a condition IS NULL Condition Test for NULL value IS NOT NULL Condition Test for NOT NULL value BETWEEN Condition Retrieve within a range (inclusive) EXISTS Condition Condition is met if subquery returns at least one row SQL Tables and Views CREATE TABLE Create a table CREATE TABLE AS Create a table from another table's definition and data ALTER TABLE Add, modify or delete columns in a table; rename a table DROP TABLE Delete a table GLOBAL TEMP Tables Tables that are distinct within SQL session LOCAL TEMP Tables Tables that are distinct within modules and embedded SQL program SQL VIEW Virtual tables (views of other tables) SQL Keys, Constraints and Indexes Primary Keys Create or drop primary keys Indexes Create and drop indexes (performance tuning) SQL Data Types Data Types Data Types in SQL SQL Programming Comments How to create comments within your SQL statement and so on. You will get complete overview of SQL database and learn skill you required for data science. **************************************************************** Connect With Me: Learn about Python, data science, Machine Learning: https://www.sheikhhanif.github.io/ Join data science group: Facebook Group: https://www.facebook.com/groups/1783416061775380/ Github: https://github.com/SheikhHanif *****************************************************************
Views: 5168 Geek's Lesson
Temporary Tables in SQL Server Tamil
 
08:23
Click here to Subscribe to IT PORT Channel : https://www.youtube.com/channel/UCMjmoppveJ3mwspLKXYbVlg Temporary tables are created while in run time and it was stored in TempDB with the Prefix of # and ##. # indicates its a Local Temporary table and ## indicates Global Temporary table. We can use local temporary table in current connection only. But any user or any connection can access global temporary tables. These tables will automatically get deleted while the connection has been closed.
Views: 347 IT Port
How to get input from user in oracle database
 
02:36
How to get input from user on run time in oracle database of Sql Plus.
Views: 369 latest ITChannel
SQL Server Performance Tuning Class @ Denmark (Oct 2018)
 
08:23
http://bit.ly/sqldenmarkoct2018 Practical SQL Server Performance Tuning Class – Denmark (Copenhagen) When: Friday, Oct 5, 2018. Where: Microsoft Denmark Office Registration & other details: http://bit.ly/sqldenmarkoct2018
Views: 519 SQLMaestros
DROP VIEW SQL DEMO
 
01:24
DROP VIEW SQL DEMO A Job Portal http://www.InterviewDot.com http://www.InterviewDot.com http://www.InterviewDot.com One Click Dream Job - http://www.interviewdot.com/upload-resume/uploadresume.htm Are you looking for a new Job ? InterviewDot.com - A Job Portal http://www.InterviewDot.com http://www.InterviewDot.com http://www.InterviewDot.com One Click Dream Job - http://www.interviewdot.com/upload-resume/uploadresume.htm JAVA/SPRING/SQL/JUNIT INTERVIEW QUESTION AND ANSWER DROP VIEW SQL DEMO
Views: 91 Interview DOT
SQL SERVER - Lesson 6B - Create Database including Pointer Table
 
00:24
This video is without sound. The previous video is on how to create a Pointer Table, with sound; but my microphone is hard to hear. Below are the actual SQL commands: --- /************** THIS IS AN EXAMPLE OF CREATING A DATABASE IN SQL */ /**** FIRST, DROP ALL THE OLD FOREIGN-KEY CONSTRAINTS **** (SKIP THIS STEP IF THE CONSTRAINTS DO NOT EXIST ****/ ALTER TABLE ActorT DROP CONSTRAINT FK_ActorT_CountryT ALTER TABLE PointerT DROP CONSTRAINT FK_PointerT_ActorT ALTER TABLE PointerT DROP CONSTRAINT FK_PointerT_MovieT /**** SECOND, DROP ALL THE OLD TABLES **** (SKIP THIS STEP IF THE TABLES DON'T EXIST ****/ DROP TABLE CountryT DROP TABLE ActorT DROP TABLE PointerT DROP TABLE MovieT /**** CREATE THE MOVIE TABLE *****************/ CREATE TABLE MovieT( MovieID nchar(10) NOT NULL DEFAULT 'XX', MovieName nchar(50), MovieYear int ) ALTER TABLE MovieT ADD CONSTRAINT C_MovieT_PK PRIMARY KEY (MovieID) INSERT INTO MovieT (MovieID , MovieName , MovieYear ) VALUES ('ST' , 'Star Trek: The Motion Picture' , 1979 ), ('ST2' , 'Star Trek 2: The Wrath of Khan' , 1984 ), ('ST3' , 'Star Trek 3: The Search for Spock' , 1986 ), ('EWWBL' , 'Every Which Way But Loose' , 1975 ) SELECT * FROM MovieT /**** CREATE THE COUNTRY TABLE */ CREATE TABLE CountryT( CountryID nchar(2) NOT NULL DEFAULT 'XX', CountryDesc nchar(40) ) ALTER TABLE CountryT ADD CONSTRAINT C_CountryT_PK PRIMARY KEY (CountryID) INSERT INTO CountryT (CountryID, CountryDesc ) VALUES ('CA' , 'Canada' ), ('US' , 'USA' ), ('UK' , 'United Kingdom'), ('JP' , 'Japan' ) SELECT * FROM CountryT /**** CREATE THE ACTOR TABLE */ CREATE TABLE ActorT( ActorID int NOT NULL DEFAULT 0, FirstName nchar(20), LastName nchar(30), BirthCountry nchar(2) ) ALTER TABLE ActorT ADD CONSTRAINT C_ActorT_PK PRIMARY KEY (ActorID) INSERT INTO ActorT (ActorID , FirstName , LastName , BirthCountry ) VALUES (1 , 'Clint' , 'Eastwood' , 'US' ), (2 , 'William' , 'Shatner' , 'CA' ), (3 , 'Leonard' , 'Nimoy' , 'US' ), (4 , 'Toshiro' , 'Mifune' , 'JP' ) SELECT * FROM ActorT /**** DEFINE THE FOREIGN KEY LINKING ACTOR TABLE TO COUNTRY TABLE */ ALTER TABLE ActorT ADD CONSTRAINT FK_ActorT_CountryT FOREIGN KEY(BirthCountry)REFERENCES CountryT(CountryID) /**** CREATE THE POINTER TABLE FOR THE MANY-TO-MANY RELATIONSHIP BETWEEN THE ACTOR TABLE AND THE MOVIE TABLE */ CREATE TABLE PointerT( ActorID int NOT NULL DEFAULT 0, MovieID nchar(10) NOT NULL DEFAULT ' ' ) ALTER TABLE PointerT ADD CONSTRAINT C_PointerT_PK PRIMARY KEY (ActorID, MovieID); CREATE INDEX IX_PointerT_ActorID ON PointerT(ActorID) CREATE INDEX IX_PointerT_MovieID ON PointerT(MovieID) ALTER TABLE dbo.PointerT ADD CONSTRAINT FK_PointerT_ActorT FOREIGN KEY(ActorID) REFERENCES dbo.ActorT(ActorID) ALTER TABLE dbo.PointerT ADD CONSTRAINT FK_PointerT_MovieT FOREIGN KEY(MovieID) REFERENCES dbo.MovieT(MovieID) INSERT INTO dbo.PointerT (ActorID, MovieID) VALUES (1, 'EWWBL'), (2, 'ST' ), (2, 'ST2' ), (1, 'ST' ) SELECT * FROM PointerT SELECT * FROM PointerT INNER JOIN ActorT ON PointerT.ActorID = ActorT.ActorID INNER JOIN MovieT ON PointerT.MovieID = MovieT.MovieID UPDATE ActorT SET FirstName = 'Bill' WHERE ActorID = 2 and FirstName = 'William' SELECT * FROM ActorT INSERT INTO PointerT (ActorID, MovieID) VALUES (3, 'ST') SELECT * FROM PointerT DELETE FROM PointerT WHERE ActorID = 3 SELECT * FROM PointerT
Views: 1141 MS / Access
Procedure Cursor Exists N IN keywords
 
27:47
Sql Server 2008 R2 Procedure Create & Using Cursor
Views: 26 Shivashwor Joshi

Gedankenstrich tastenkombination windows
Apns windows server 2008
Hpsssb login microsoft
No device manager windows 8
Dns resolv conf windows live