How Connect to a Database in Shell Programming?
Answers were Sorted based on User's Feedback
Answer / ashu
you have a "sqlplus" command to connect to database.
command is as follows:
sqlplus <db_username>/<db_password> @test.sql
Is This Answer Correct ? | 19 Yes | 6 No |
Answer / sibin kc
You can simply use as follows.
mysql -h <hostname> -u <user name> -p<password> -e "use
psa;select * from domains where domain_name = 'hai.com';"
Is This Answer Correct ? | 9 Yes | 6 No |
Answer / seshadri sethi
(1)1st give "sqlplus"
(2)then it will show "sqlplus" prompt
(3)give "db username"
(4)give "db password"
Is This Answer Correct ? | 8 Yes | 6 No |
Answer / supraja
mysql -uusername -ppassword -hipaddress database -e "statement"
eg:mysql -uroot -psuppu -h192.168.0.1 supraja -e "select
count(*) from table"
Is This Answer Correct ? | 2 Yes | 0 No |
What is a command line shell?
The information of the two files should be redirect to Third file in such a way that, the third file contain the information like this. 1st line in third file should be from 1st file 2nd line in Third file should be from 2nd file 3rd line in Third file should be from 1st file 4th line in Third file should be from 2nd file - - so on
How to write a function?
What are the four fundamental components of every file system on linux?
Differentiate between ‘ and ” quotes.
What are the different variables present in linux shell?
How do I open a jshell in cmd?
What are the default permissions of a file when it is created?
I have to write Shells (Linux + Unix)for publishing packages and reports. Is it possible ? What are the differents executable programs ineed to call ?
How to initialize a directory size to a variable??
How do I run a powershell script?
RAM one table colums a1,a2,a3,a4 respective values 2,4,7,8 KRISH one table colums a1,a2,a3,a4 respective values 3,4,6,9 IN RAM & KRISH a4 column if comparing values RAM A4 - KRISH A4 ( 8-9 =1 THEN print 5 or (RAM) a4 value 10 KRISH a4 values 2 then 10 -2 =8 print 5*8=40 or diff 5 print same