簡單資料庫及表建立shell指令碼

2021-06-09 06:51:21 字數 502 閱讀 9204

#!/bin/bash

user='root'

pass='123'

mysql -u $user -p$pass create database test1;

eof[ $? -eq 0 ] && echo "the database created test1" || echo "the database test1 is already exist"

mysql -u $use test1 create table test1(

ind int,

name varchar(20)

);eof

[ $? -eq 0 ] && echo "the table created test1" || echo "the table test1 is already exist"

mysql -u $user -p$pass test1

eof

簡單資料庫程式設計

1 修改配置檔案 web.config 2 建立鏈結類 connection.cs using system.data.sqlclient 新增名字空間 public static sqlconnection getconnection return new sqlconnection system...

SQLite簡單資料庫

通過觀察可以發現,不管是聊天列表還是 列表,有乙個共性 資料量大和資料結構複雜 那麼為什麼我們要用sqlite,有這麼幾個原因 sqlite常用的幾種資料型別為text文字型,integer整型,real浮點型,建 式要用規定的格式,如下 create table product 建立資料庫和資料表...

php簡單資料庫練習

consolelog include test 接收使用者提交資料,並儲存到資料庫中 if post elseelse else else 登陸頁面時,從資料庫讀取 連線資料庫操作 servername localhost username root passowrd root 建立連線 conn ...