current Flashcards
are strings mutable or immutable in java and why
immutable.
because of security issues, minimize memory
what is a string
a data type that represents text
name 3 string methods
lenght
concat
charA
sql create table
CREATE TABLE table_name
sql RDMS
program that allows you to create, update, and administer a relational database
sql how to select all tables + rows
SELECT * FROM table_name
sql what does WHERE do
allows you to filter a result based on a condition
eg SELECT * FROM Customers
WHERE Country = Mexico
————————–
SELECT column1, column2, columnN
FROM table_name
WHERE [condition]
sql retrieve data from table
SELECT x FROM y
SQL truncate vs drop
truncate dels data from table but not table itself
drop dels table.
sql what is join
list joins and describe
- combines records from 2 or more tables.
- inner join
- left join
- rt join
- full join
inner - returns rows having matching values in both tables.
left - returns all rows from left table and matching rows from rt table.
right- returns all rows from rt table and matching
full - returns all rows from left and rt table
primary key vs foreign key
primary key uniquely identifies each record in a db.
foreign key links two tables together
sql select all tables from a specific db
SELECT * FROM db_name
sql create dbase
CREATE DATABASE database_name
sql create table
CREATE TABLE table_name
sql alter table
adds, deletes, or modifies columns in a table
ALTER TABLE table_name
ALTER TABLE Customers
DROP COLUMN ContactName; // deletes col
what is sql
structured qurey lang. let’s you access and manipulate dbs.