Oracle_Sql_Cheatsheet

.xlsx

School

Rutgers University, Newark *

*We aren’t endorsed by this school

Course

311

Subject

Information Systems

Date

Oct 30, 2023

Type

xlsx

Pages

12

Uploaded by jackelynbenavides842

Report
Command Description Category Truncate Describe Create Insert Insert multiple values at a time Update Update attributes in a table Alter Adding Column Alter Dropping Column Alter Modify Column/Datatype Delete Select DML Distinct DML From DML Where DML DML Selects attributes to be returned by the query It is used to specify that the statement is a query which returns unique values in specified column Specifies the tables from which data will be retrieved Filters the rows of data based on provided criteria Where(Comparison Operators) Equal to(=); Less Than(<); Less Than Or Equal to(<=); Greater Than (>); Greater Than Or Equal to(>-=); Not Equal to (<> or !=)
Where(Logical Operators) DML Where(Special) DML Where(Special) DML Where(Special) DML Where(Special) DML Where(Special) DML Offset DML Group By DML Having DML Allows to include multiple conditions in a query through the use of logical operators (AND OR, AND NOT) BETWEEN : Used to check whether an attribute is within a range IN : Used to check whether an attribute value matches any value within a value list LIKE : Used to check whether an attribute value matches a given string pattern; Allows you to use % and underscore(_) wildcard characters to make matches when the entire string is not known IS NULL: Used to check whether an attribute value is null NOT IN: Value must be compared against the list must evaluate to False when compared against every value in the list The first row returned by LIMIT will be determined by offset_value Groups the rows of data into collections based on sharing the same values in one or more attributes Filters the groups formed in the GROUP BY clause based on provided criteria
Order By DML Natural Join DML Join Using DML Join On DML Left Join DML Right Join DML Sorts the final query result rows in ascending or descending order based on the values of one or more atributes The join is based on all the columns in the two tables that have the same name and data types The query returns only the rows with matching values in the column indicated in the USING clause-and that column must exist in both tables. SELECT table1.column, table2.column FROM table1 JOIN table2 ON (table1.column_name = table2.column_name); The LEFT JOIN keyword returns all records from the left table (table1), and the matched records from the right table (table2). The result is NULL from the right side, if there is no match. Note: In some databases LEFT JOIN is called LEFT OUTER JOIN. ANSI standard defines three types of outer joins: Left, right, and full The right outer join returns not only the rows matching the join condition(that is rows with matching values in the common column)
Full Join DML Cross Join DML The full outer join returns not only the rows matching the join condition, but it also returns all of the rows with unmatched values in the table on either side A cross join performs a relational product (also known as Cartesian Product) of two tables.
Syntax SELECT DISTINCT column_name FROM table_name; INSERT ALL INTO mytable (column1, column2, column_n) VALUES (expr1, expr2, expr_n) INTO mytable (column1, column2, column_n) VALUES (expr1, expr2, expr_n) INTO mytable (column1, column2, column_n) VALUES (expr1, expr2, expr_n) UPDATE table-Name SET column-Name = Value [ , column-Name = Value ]* WHERE CURRENT OF SELECT * FROM table_name; SELECT column1, column2, ... FROM table_name; SELECT columnlist FROM tablelist; SELECT column_name(s) FROM table_name WHERE conditionlist ORDER BY columnlist [ASC|DESC]; SELECT column_name(s) FROM table_name WHERE conditionlist ORDER BY columnlist [ASC|DESC];
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help

Browse Popular Homework Q&A

Q: Convert the point (x,y,z)=(−3,−3,5) to spherical coordinates. Give answers as positive values,…
Q: : Starting with the program from 16-2 which processes Death Valley data, modify the program such…
Q: The net power output of the steam cycle is 40 MW. If the pressure bounds on the cycle are 5 MPa and…
Q: The beam shown in the figure has a roller support at A, a fixed support at C and an internal hinge…
Q: Engineers designed a miniature robot that can crawl through pipes and vents that humans can't…
Q: Consider the following. A 4=; B = 3 (0,B) -A y X
Q: 2. (9.32) The x-component of a force = Fi on a golf ball (m = 46 g) exerted by some sort of iron is…
Q: 7. Analyze the circuit in Figure for the following ( 17-67 f = 25 kHz): a. Itot b. Ptrue c. Pr d. Pa…
Q: According to the latest financial reports from a sporting goods store, the mean sales per customer…
Q: Air expands in a piston-cylinder from 500 kPa to 100 kPa in a polytropic process with n 1.5. The…
Q: iii) A water molecule collides with a stationary glass window. Which of the following is true? a.…
Q: Consider the function f(x) = Use the graphing utitlity to graph f. f(x) = X-2 20 y 10- -20 -10 10…
Q: I have this menu: [1] load shapes, [2] exit the program, [3] add shapes. my python program uses…
Q: 2. If a 1 and an+1 = 3(1+) for each n> 1. 3+0 Does the sequence converge? What is the limit?
Q: Can you solve for part D? I want to check my answer
Q: Given Q(x) = −3x5 + 2x4 + 6x2 −x + 4, use the Remainder Theorem to determine the remainder when Q(x)…
Q: 5πT Convert the point (p, 0, ¢) = 3, π to Cartesian coordinates. Give answers either as expressions,…
Q: Problem 8: Consider the density function f(x) = a) Evaluate k. b) Find F(x). c) Use F(x) to evaluate…
Q: The average speed of a gas molecule in meters per second is Vaug 8RT where the temperature T is…
Q: What are the advantages and disadvantages of using benzodiazepine hypnotics versus non -…
Q: The vector v has initial point P and terminal point Q. Write v in the form ai + bj + ck. That is,…
Q: Step by step guide. Thank you very much!   Find the derivative of the function. y = x2ex − 2xex +…