We can convert the timestamp to date time with the help of FROM_UNIXTIME() function. Let us see an example. First, we will create a table with column of int type. Then we convert it to timestamp and again into date time. Creating a table with integer type. mysql> create table TimestamptoDateDemo -> ( -> YourTimeStamp int(11) -> ); Query OK, 0 rows affected (0.57 sec) Inserting records into the table. mysql> insert into TimestamptoDateDemo values(1389453221); Query OK, 1 row affected (0.23 sec) To display all the ... Read More
In 8085 Instruction set, INX SP instruction is used to increment the SP contents by 1. INX SP instruction is a special case of INX rp instruction which increases the content of the register pair. This instruction occupies only 1-Byte in memory. Mnemonics, Operand Opcode(in HEX) Bytes INX SP 33 1 Let us consider that the initial content of SP is 4050H. So after increment of the content of SP by using INX SP instruction, SP would have the value 4051H. Here is the required tracing table as below − Before ... Read More
The maximum length of a table name is 64 characters long according to MySQl version 8.0.12. Check your installed MySQL version. mysql> select version(); The following is the output. +-----------+ | version() | +-----------+ | 8.0.12 | +-----------+ 1 row in set (0.03 sec) We can check the maximum length of the table name at the time of creating it. If we give more than 64 characters, then it will not create a table and an error is thrown. Creating a table which has more than 64 characters of table name. mysql> ... Read More
In 8085 Instruction set, DCX SP instruction is used to decrement the SP contents by 1. DCX SP instruction is a special case of DCXrpinstruction which decreases the content of the register pair. This instruction occupies only 1-Byte in memory. Mnemonics, Operand Opcode(in HEX) Bytes DCX SP 3B 1 Let us consider that the initial content of SP is 4050H. So after decrement of the content of SP by using DCX SP instruction, SP would have the value 404FH. Here is the required tracing table as below − Before After ... Read More
In 8085 Instruction set, DAD SP instruction is a special case of DAD rp instruction. In this instruction contents of HL and SP will get added and sum thus produced will get stored onto HL register pair. It occupies only 1-Byte in memory. Mnemonics, Operand Opcode(in HEX) Bytes DAD SP 39 1 Let us discuss about this instruction execution with one example. We are considering that HL and SP registers are having initial contents as 4050H and 5050H. So after execution of DAD SP instruction, the addition result will be 90A0H which will get ... Read More
BIT can be used to store the value of 1 bit. It could be 0 or 1. We cannot store, for example 2 with data type BIT. If we try to insert 2 with BIT data type, MySQL raises an error. TINYINT can be used to store value of 8 bits. The maximum value we can store is 127.We cannot store, for example 987 with 8 bit value. If we try to insert 987 with TINYINT data type, MySQL raises an error. Let us work it through MySQL version 8.0.12. To check the version installed on your system. mysql> ... Read More
In 8085 Instruction set, NOP is an instruction which is falling under Machine Control Instruction category. NOP is a mnemonic that stands for “No Operation”. This instruction does nothing during execution. Only it occupied 1-Byte of memory space and spends 4-Machine Cycles. Mnemonics, Operand Opcode(in HEX) Bytes NOP 00 1 In spite of the fact that it does nothing, still it has got many different applications. It is useful in the following cases − NOP instruction can be used to create small-time delay in the execution of the code. It is very ... Read More
The basic difference between Boolean and tinyint(1) is only in the naming convention. If we say that we need true or false values then Boolean comes to our mind, instead of tinyint(1). These data types are synonyms. It is up to us which data type we want to use- values can be 1 and 0 or true and false. The following is an example. Creating a table with Boolean data type. mysql> create table BooleanDemo -> ( -> Light Boolean -> ); Query OK, 0 rows affected (0.52 sec) ... Read More
Problem Statement − Move a block of 16 data stored from 8050H to 805FH to a target location from 8070F to 807FH. Address Hex Codes Label Mnemonic T-States Comment 8000 21 50 80 START: LXI H, 8050H 10 Setup HL pair as a pointer for source memory. 8003 11 70 80 LXI D, 8070H 10 Set up DE pair as a pointer for destination memory 8006 06 10 MVI B, 10H 7 Set up B to count 16 bytes 8008 7E LOOP: MOV A, M 7 Get ... Read More
In MySQL, the term cardinality refers to the uniqueness of data values that can be put into columns. It is a kind of property which influences the ability to search, cluster and sort data. Cardinality can be of two types which are as follows − Low Cardinality − All values for a column must be same. High Cardinality − All values for a column must be unique. The concept of high cardinality is used if we put a constraint on a column in order to restrict duplicate values. High Cardinality The following is an example of High Cardinality, ... Read More