Populate a Table from Query Results in MySQL

Ankith Reddy
Updated on 30-Jul-2019 22:30:24

541 Views

To populate a table from query results, use the following syntax:INSERT yourTableName(yourColumnName1, yourColumnName2, yourColumnName3, ..........N) SELECT yourColumnName1, yourColumnName2, yourColumnName3, ..........N FROM yourAnotherTableName;To understand the above syntax, let us create a table. The first table is as follows with some records. The query to create a table is as follows:mysql> create table PopulateTableDemo    -> (    -> Id int NOT NULL AUTO_INCREMENT,    -> Name varchar(20),    -> Amount int,    -> ArrivalDateTime datetime,    -> PRIMARY KEY(Id)    -> ); Query OK, 0 rows affected (0.68 sec)Now you can insert some records in the table using insert command. The ... Read More

Add and Remove Encryption for MS PowerPoint Presentation

yashwanth sitamraju
Updated on 30-Jul-2019 22:30:24

3K+ Views

Microsoft Office provides you with a feature of encrypting or protecting your powerpoint presentations from opening and modifying by other people. Even if you allow others to change your document, still you can restrict the changes others can do to your document.The only hitch is Microsoft cannot retrieve your forgotten passwords. So be careful with your passwords.The encryption offered by Microsoft is very strong. In a word document, you need not to change the encryption length unless you have a specific reason to alter the settings. Microsoft uses AES with a 128bit key, plus SHA1 salt and cipher block chaining ... Read More

Difference Between MySQL BOOL and BOOLEAN Column Data Types

Ankith Reddy
Updated on 30-Jul-2019 22:30:24

1K+ Views

BOOL and BOOLEAN both acts like TINYINT(1). You can say that both are synonyms for TINYINT(1).BOOLEANHere is an example of BOOLEAN. The query to create a table with column boolean type.mysql> create table Demo -> ( -> isVaidUser boolean -> ); Query OK, 0 rows affected (1.08 sec)The query to insert records in the table using insert command is as follows −mysql> insert into Demo values(true); Query OK, 1 row affected (0.19 sec) mysql> insert into Demo values(0); Query OK, 1 row affected (0.17 sec)Display all values from the table ... Read More

What is the Mohu Airwave All About

Knowledge base
Updated on 30-Jul-2019 22:30:24

130 Views

Airwave is an OTA (Over-The-Air) antenna. Unlike cable TV, this is a wireless antenna that offers you with all the stuff that a normal cable TV used to offer such as local news, daily soaps, prime-time shows, sports etc. with crystal clear HD quality. This is the first OTA antenna that works with the help of your Wi-fi network.Mohu AirwaveMohu is the maker of Mohu Sky, which has launched Mohu Airwave in the last year’s International Consumer Electronics Show. The Airwave is an OTA antenna which can be placed anywhere in the house and provides optimal signal reception that makes ... Read More

Connecting to MySQL Database from the Command Line

George John
Updated on 30-Jul-2019 22:30:24

3K+ Views

To connect MySQL from the command line, firstly open command prompt. You can do this with the help of shortcut key “Windows + R”. On clicking, a panel will open and you need to type CMD and need to press OK button as shown below −After pressing the OK button, you will get command line window.Reach the MySQL Server “bin” directory as shown in the following screenshot −Now you have reached the bin directory. Type the following statement in order to connect with MySQL.mysql -u yourUserName -pApply the above statement to connect with MySQL. The snapshot is as follows with ... Read More

Add Boolean Field to MySQL

Arjun Thakur
Updated on 30-Jul-2019 22:30:24

2K+ Views

You can use tinyint(1) or bool or boolean. All are synonym. If you use bool or boolean datatype, then it nternally change into tinyint(1).In PHP, the value 0 represents false and 1 represents true. Any other number except 0 is also true.Let us check the internal representation of bool or boolean using a table. The query to create a table is as follows.mysql> create table AddBoolDemo -> ( -> isToggle bool -> ); Query OK, 0 rows affected (1.24 sec)To check the DDL of the table, the following is the query.SHOW CREATE TABLE yourTableName;Let us check the representation of bool ... Read More

8085 Program to Add Numbers in an Array

Vrundesha Joshi
Updated on 30-Jul-2019 22:30:24

3K+ Views

In this program we will see how to add a blocks of data using 8085 microprocessor.Problem StatementWrite 8085 Assembly language program to add numbers in an array, where the size of the array is N. The value of N is provided.DiscussionIn this problem we are using location 8000H to hold the length of the block. The main block is stored from address 8010H. We are storing the result at location 9000H and 9001H. The 9000H holding the lower byte, and 9001H is holding the upper byte.Repeatedly we are taking the number from the memory, then adding it with accumulator and ... Read More

Remove Double or More Spaces from a String in MySQL

Ankith Reddy
Updated on 30-Jul-2019 22:30:24

878 Views

You can create a function to remove double or more spaces from a string. The syntax is as follows:DELIMITER // create function yourFunctionName(paramter1, ...N) returns datatype; begin //your statement. end; // DELIMITER ;Here’s how to create a function:mysql> delimiter // mysql> create function function_DeleteSpaces(value varchar(200)) returns varchar(200)    -> begin    -> set value = trim(value);    -> while instr(value, ' ') > 0 do    -> set value = replace(value, ' ', ' ');    -> end while;    -> return value;    -> END;    -> // Query OK, 0 rows affected (0.20 sec) mysql> delimiter ;Now you ... Read More

Develop Notepad Using Tkinter in Python

karthikeya Boyini
Updated on 30-Jul-2019 22:30:24

3K+ Views

Tkinter is a GUI library from python from which we can create multiple GUI apps. Here, using tkinter we will develop a notepad like text editor. This notepad will have the menu where we can create new file, open existing file, save the file, editing, cut and paste, all functionality will there.PrerequisitePython installed.Tkinter installed.Note: tkinter comes as a standard library with python 3.x.Adding menu items:Our notepad will have four main menu items: File, Edit, Commands & Help. Our file menu item will have four sub-items- New, Open, Save & Exit.Our edit menu item will have three sub-items- cut, copy & ... Read More

Change MySQL Default Character Set to UTF-8 in my.cnf

Chandu yadav
Updated on 30-Jul-2019 22:30:24

1K+ Views

To change MySQL default character set to UTF-8 in my.cnf, firstly reach the location of my.cnf file.The following is the screenshot of “my.cnf” file. Firstly, open the C: directory and the “Program Data” folder −Now, click on “MySQL” folder −Now, click the MySQL Server 8.0 folder and open it −After opening MySQL Server 8.0, you will get “my.cnf” file location.After opening my.cnf file, you will get the character-set. Open the file and the following contens are visible −Now you can change the character-set to utf8.

Advertisements