Results: 1578
Notes
  • Newest first
  • Oldest first
  • Newest first(All)
  • Oldest first(All)
Arrays VS Sets
const taskArrays = ['code', 'Eat', 'code'];
console.log(taskArrays);
//["code", "Eat", "code"]
Use when you need
ordered
list of values (might contains duplicates) Use when you need to
manipulate
data
const taskSets = new Set(['code', 'Eat', 'code']);
console.log(taskSets);
//{"code", "Eat"}
Use when you need to work with
unique
values Use when
High-performance
is really important Use to
remove
duplicates from arrays
by გიორგი ბაკაშვილი
4 years ago
0
0
TRUNCATE
Deletes all the rows from
notes
table
TRUNCATE notes;
The same as the query above - deletes all rows
TRUNCATE TABLE notes;
Note: The two queries are aliases for each other
by Valeri Tandilashvili
4 years ago
0
MySQL
TRUNCATE
1
Deletes the table
notes
with its content
DROP TABLE notes;
If the table does not exist, it will generate the following error:
#1051 - Unknown table 'notes
Deletes several tables at the same time
DROP TABLE notes, students;
Deletes the table if exists, otherwise it will not generate an error
DROP TABLE IF EXISTS notes;
Note: There is no undo. Once we delete, the table is gone
by Valeri Tandilashvili
4 years ago
0
MySQL
DROP
Full MySQL Course for Beginners
1
Converts the first argument from one number system (the second argument) to another (the third argument) Converts
5
from
10
base system to
2
SELECT
    CONV(5, 10, 2)
by Valeri Tandilashvili
4 years ago
0
MySQL
Mathematical functions
Full MySQL Course for Beginners
1
POWER
Raises the first argument to the power of another argument. The code below returns
16
because
2
to the power of
4
is
16
SELECT 
    POWER(2, 4)
Note:
POW
and
POWER
are the aliases for the same command
by Valeri Tandilashvili
4 years ago
0
MySQL
Mathematical functions
Full MySQL Course for Beginners
1
These two functions are opposite to each other.
180
degrees converted to radians gives us
PI
:
3.141592653589793
PI
:
3.141592653589793
radians converted to degrees gives us
180
degrees.
SELECT
    RADIANS(180),
    DEGREES(3.141592653589793)
by Valeri Tandilashvili
4 years ago
0
MySQL
Mathematical functions
Full MySQL Course for Beginners
1
Converts radians back to degrees. Half of
PI
radians
1.5707963267948966
converted to degrees gives us
90
degrees.
PI
:
3.141592653589793
radians converted to degrees gives us
180
degrees.
SELECT
    DEGREES(1.5707963267948966),
    DEGREES(3.141592653589793)
by Valeri Tandilashvili
4 years ago
0
MySQL
Mathematical functions
Full MySQL Course for Beginners
0
Converts degrees to radians.
90
degrees converted to radians gives us half of
PI
:
1.5707963267948966
.
180
degrees converted to radians gives us
PI
:
3.141592653589793
.
SELECT
    RADIANS(90),
    RADIANS(180)
by Valeri Tandilashvili
4 years ago
0
MySQL
Mathematical functions
Full MySQL Course for Beginners
1
Rounds the number up to the lowest integer value greater than the passed decimal argument. Both of the arguments will be rounded to
3
SELECT
    CEIL(2.3),
    CEIL(2.8)
by Valeri Tandilashvili
4 years ago
0
MySQL
Mathematical functions
Full MySQL Course for Beginners
1
Rounds the argument down to the greater integer less then the decimal argument. Both of the arguments will be rounded down to
2
SELECT
    FLOOR(2.3),
    FLOOR(2.8)
by Valeri Tandilashvili
4 years ago
0
MySQL
Mathematical functions
Full MySQL Course for Beginners
1
Results: 1578