Selecting Fields with Parameters from a Table
To select fields and all parameters by field from a table, you can use the SP_COLUMNS procedure. Example: exec sp_columns [Table Name]
To select fields and all parameters by field from a table, you can use the SP_COLUMNS procedure. Example: exec sp_columns [Table Name]
The ADDDATE function returns the input time specified by the first parameter, with the added time interval specified by the second parameter. Syntax: ADDDATE(date, INTERVAL expr type) There is a synonym for the ADDDATE() function: DATE_ADD(). The second parameter of the function starts with the keyword INTERVAL, followed by the value and type of this value. The function also allows the use of negative values, in which case the period is subtracted, not added.
This publication will consider some functions of irreversible encryption used in the MySQL database management system. The MD5() function produces irreversible encryption of incoming data using the MD5 (Message-Digest Algorithm) algorithm. The function accepts a string as input and returns a 128-bit checksum calculated using the MD5 algorithm. The returned value is a 32-bit hexadecimal number, unique for each string. If the strings differ by at least one character, the result of the MD5() function for these strings will be different, for two identical strings - the result will always be the same.
The AES_ENCRYPT() and AES_DECRYPT() functions perform symmetric encryption and decryption of data using the AES (Advanced Encryption Standard) algorithm, using 128-bit encoding. There is an option to expand to 256-bit, but 128-bit is chosen as the standard in MySQL, as it is considered secure and faster.<br><br>The syntax of the functions:
The error occurs due to the user's lack of access, to provide this access, we do this: $ mysql -u root -p Enter password: mysql> use mysql mysql> GRANT ALL ON *.* to root@'192.168.1.4' IDENTIFIED BY 'your-root-password'
This query returns a set of table fields with all characteristics. The method is also applicable and works great with views VIEW. SELECT ORDINAL_POSITION ,COLUMN_NAME ,DATA_TYPE ,CHARACTER_MAXIMUM_LENGTH ,IS_NULLABLE ,COLUMN_DEFAULT…
Sometimes there is a need to delete a temporarily created table during a procedure, which may or may not exist. Simply writing, for example, drop table #myTempTable is not enough, because if the table does not exist, the query will not execute and will return an error. The example below shows how to correctly delete temporary tables in such cases:
Occasionally, I have to work with FireBird and Interbase databases. Recently, I needed to find and select all nested elements of a tree. In my case, I had to delete all nested groups of the tree when deleting the parent group and later organize the search for all nested elements.
I've been interested in this question for a long time! How can I do it? Insert multiple rows into a table with one query. The thing is that in the InterBase DBMS, unlike many other DBMS, a query of the type:
В этой публикации я рассмотрю подробно, на сколько это возможно, основные типы данных используемые в СУБД MySQL. MySQL поддерживает несколько различных типов данных: Числовые данные — это все целые числа (без дробной части) и вещественные ч…